Apply suggestions

Signed-off-by: Pawel Kojma <pkojma@internships.antmicro.com>
This commit is contained in:
Pawel Kojma 2026-07-03 10:22:07 +02:00
parent 02e0332d12
commit b92ec9f3d7
2 changed files with 15 additions and 7 deletions

View File

@ -24,7 +24,6 @@
#ifndef VERILATOR_VERILATED_TYPES_H_
#define VERILATOR_VERILATED_TYPES_H_
#include "verilatedos.h"
#ifndef VERILATOR_VERILATED_H_INTERNAL_
#error "verilated_types.h should only be included by verilated.h"
#endif
@ -2071,15 +2070,24 @@ struct VlNull final {
return nullptr;
}
template <class T>
VL_CONSTEXPR_CXX17 bool operator==(T* ptr) const {
return !ptr;
bool operator==(T* rhs) const {
return !rhs;
}
template <class T>
VL_CONSTEXPR_CXX17 bool operator==(const T* ptr) const {
return !ptr;
bool operator==(const T* rhs) const {
return !rhs;
}
};
template <class T>
inline bool operator==(T* lhs, VlNull) {
return !lhs;
}
template <class T>
inline bool operator==(const T* lhs, VlNull) {
return !lhs;
}
//===================================================================
// Verilog class reference container
// There are no multithreaded locks on this; the base variable must

View File

@ -4,13 +4,13 @@
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
test.scenarios('vlt')
test.compile(verilator_flags2=['--binary', '--timing', '--compiler', 'clang', '-Wno-fatal'])
test.compile(verilator_flags2=['--binary', '-Wno-WIDTHTRUNC'])
test.passes()