Internals: Use C++11 = default where obvious. No functional change intended.

This commit is contained in:
Wilson Snyder 2020-11-16 19:56:16 -05:00
parent 70b3a599ce
commit 1b0a48ea02
118 changed files with 381 additions and 373 deletions

View File

@ -1,4 +1,4 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-modernize*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-default-arguments,-fuchsia-overloaded-operator,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance' Checks: '*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-*,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance'
WarningsAsErrors: '' WarningsAsErrors: ''
HeaderFilterRegex: '' HeaderFilterRegex: ''
FormatStyle: none FormatStyle: none

View File

@ -445,12 +445,13 @@ CLANGTIDY = clang-tidy
CLANGTIDY_FLAGS = -config='' -checks='-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables' CLANGTIDY_FLAGS = -config='' -checks='-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables'
CLANGTIDY_DEP = $(subst .h,.h.tidy,$(CPPCHECK_H)) \ CLANGTIDY_DEP = $(subst .h,.h.tidy,$(CPPCHECK_H)) \
$(subst .cpp,.cpp.tidy,$(CPPCHECK_CPP)) $(subst .cpp,.cpp.tidy,$(CPPCHECK_CPP))
CLANGTIDY_DEFS = -DVL_DEBUG=1 -DVL_THREADED=1 -DVL_CPPCHECK=1
clang-tidy: $(CLANGTIDY_DEP) clang-tidy: $(CLANGTIDY_DEP)
%.cpp.tidy: %.cpp %.cpp.tidy: %.cpp
$(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) | 2>&1 tee $@ $(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- $(CLANGTIDY_DEFS) $(CPPCHECK_INC) | 2>&1 tee $@
%.h.tidy: %.h %.h.tidy: %.h
$(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) | 2>&1 tee $@ $(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- $(CLANGTIDY_DEFS) $(CPPCHECK_INC) | 2>&1 tee $@
analyzer-src: analyzer-src:
-rm -rf src/obj_dbg -rm -rf src/obj_dbg

View File

@ -2202,9 +2202,6 @@ void VL_TIMEFORMAT_IINI(int units, int precision, const std::string& suffix,
//=========================================================================== //===========================================================================
// Verilated:: Methods // Verilated:: Methods
Verilated::ThreadLocal::ThreadLocal() {}
Verilated::ThreadLocal::~ThreadLocal() {}
void Verilated::debug(int level) VL_MT_SAFE { void Verilated::debug(int level) VL_MT_SAFE {
const VerilatedLockGuard lock(m_mutex); const VerilatedLockGuard lock(m_mutex);
s_s.s_debug = level; s_s.s_debug = level;
@ -2648,8 +2645,6 @@ void* VerilatedVarProps::datapAdjustIndex(void* datap, int dim, int indx) const
//====================================================================== //======================================================================
// VerilatedScope:: Methods // VerilatedScope:: Methods
VerilatedScope::VerilatedScope() {}
VerilatedScope::~VerilatedScope() { VerilatedScope::~VerilatedScope() {
// Memory cleanup - not called during normal operation // Memory cleanup - not called during normal operation
VerilatedImp::scopeErase(this); VerilatedImp::scopeErase(this);

View File

@ -133,8 +133,8 @@ class VL_CAPABILITY("mutex") VerilatedMutex {
private: private:
std::mutex m_mutex; // Mutex std::mutex m_mutex; // Mutex
public: public:
VerilatedMutex() {} VerilatedMutex() = default;
~VerilatedMutex() {} ~VerilatedMutex() = default;
const VerilatedMutex& operator!() const { return *this; } // For -fthread_safety const VerilatedMutex& operator!() const { return *this; } // For -fthread_safety
/// Acquire/lock mutex /// Acquire/lock mutex
void lock() VL_ACQUIRE() { void lock() VL_ACQUIRE() {
@ -186,7 +186,7 @@ class VerilatedLockGuard {
public: public:
explicit VerilatedLockGuard(VerilatedMutex&) {} explicit VerilatedLockGuard(VerilatedMutex&) {}
~VerilatedLockGuard() {} ~VerilatedLockGuard() = default;
void lock() {} void lock() {}
void unlock() {} void unlock() {}
}; };
@ -330,7 +330,7 @@ private:
Type m_type = SCOPE_OTHER; ///< Type of the scope Type m_type = SCOPE_OTHER; ///< Type of the scope
public: // But internals only - called from VerilatedModule's public: // But internals only - called from VerilatedModule's
VerilatedScope(); VerilatedScope() = default;
~VerilatedScope(); ~VerilatedScope();
void configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp, void configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp,
const char* identifier, vlsint8_t timeunit, const Type& type) VL_MT_UNSAFE; const char* identifier, vlsint8_t timeunit, const Type& type) VL_MT_UNSAFE;
@ -387,7 +387,7 @@ class Verilated {
int s_randReset; ///< Random reset: 0=all 0s, 1=all 1s, 2=random int s_randReset; ///< Random reset: 0=all 0s, 1=all 1s, 2=random
int s_randSeed; ///< Random seed: 0=random int s_randSeed; ///< Random seed: 0=random
Serialized(); Serialized();
~Serialized() {} ~Serialized() = default;
} s_s; } s_s;
static struct NonSerialized { // Non-serialized information static struct NonSerialized { // Non-serialized information
@ -407,8 +407,8 @@ class Verilated {
VerilatedMutex m_argMutex; ///< Mutex for s_args members, when VL_THREADED VerilatedMutex m_argMutex; ///< Mutex for s_args members, when VL_THREADED
int argc = 0; int argc = 0;
const char** argv = nullptr; const char** argv = nullptr;
CommandArgValues() {} CommandArgValues() = default;
~CommandArgValues() {} ~CommandArgValues() = default;
} s_args; } s_args;
// Not covered by mutex, as per-thread // Not covered by mutex, as per-thread
@ -422,8 +422,8 @@ class Verilated {
const char* t_dpiFilename = nullptr; ///< DPI context filename const char* t_dpiFilename = nullptr; ///< DPI context filename
int t_dpiLineno = 0; ///< DPI context line number int t_dpiLineno = 0; ///< DPI context line number
ThreadLocal(); ThreadLocal() = default;
~ThreadLocal(); ~ThreadLocal() = default;
} t_s; } t_s;
private: private:

View File

@ -52,7 +52,7 @@ public: // But only local to this file
m_vals[i] = 0; m_vals[i] = 0;
} }
} }
virtual ~VerilatedCovImpItem() {} virtual ~VerilatedCovImpItem() = default;
virtual vluint64_t count() const = 0; virtual vluint64_t count() const = 0;
virtual void zero() const = 0; virtual void zero() const = 0;
}; };
@ -78,7 +78,7 @@ public:
: m_countp{countp} { : m_countp{countp} {
*m_countp = 0; *m_countp = 0;
} }
virtual ~VerilatedCoverItemSpec() override {} virtual ~VerilatedCoverItemSpec() override = default;
}; };
//============================================================================= //=============================================================================
@ -105,7 +105,7 @@ private:
int m_insertLineno VL_GUARDED_BY(m_mutex) = 0; ///< Line number about to insert int m_insertLineno VL_GUARDED_BY(m_mutex) = 0; ///< Line number about to insert
// CONSTRUCTORS // CONSTRUCTORS
VerilatedCovImp() {} VerilatedCovImp() = default;
VL_UNCOPYABLE(VerilatedCovImp); VL_UNCOPYABLE(VerilatedCovImp);
public: public:

View File

@ -108,10 +108,13 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
VlQueue() {
// m_defaultValue isn't defaulted. Caller's constructor must do it. // m_defaultValue isn't defaulted. Caller's constructor must do it.
} VlQueue() = default;
~VlQueue() {} ~VlQueue() = default;
VlQueue(const VlQueue&) = default;
VlQueue(VlQueue&&) = default;
VlQueue& operator=(const VlQueue&) = default;
VlQueue& operator=(VlQueue&&) = default;
// Standard copy constructor works. Verilog: assoca = assocb // Standard copy constructor works. Verilog: assoca = assocb
// Also must allow conversion from a different T_MaxSize queue // Also must allow conversion from a different T_MaxSize queue
@ -426,8 +429,13 @@ template <std::size_t T_Words> class VlWide {
public: public:
// cppcheck-suppress uninitVar // cppcheck-suppress uninitVar
VlWide() {} VlWide() = default;
~VlWide() {} ~VlWide() = default;
VlWide(const VlWide&) = default;
VlWide(VlWide&&) = default;
VlWide& operator=(const VlWide&) = default;
VlWide& operator=(VlWide&&) = default;
// METHODS
const WData& at(size_t index) const { return m_storage[index]; } const WData& at(size_t index) const { return m_storage[index]; }
WData& at(size_t index) { return m_storage[index]; } WData& at(size_t index) { return m_storage[index]; }
WData* data() { return &m_storage[0]; } WData* data() { return &m_storage[0]; }
@ -467,11 +475,13 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
VlAssocArray() {
// m_defaultValue isn't defaulted. Caller's constructor must do it. // m_defaultValue isn't defaulted. Caller's constructor must do it.
} VlAssocArray() = default;
~VlAssocArray() {} ~VlAssocArray() = default;
// Standard copy constructor works. Verilog: assoca = assocb VlAssocArray(const VlAssocArray&) = default;
VlAssocArray(VlAssocArray&&) = default;
VlAssocArray& operator=(const VlAssocArray&) = default;
VlAssocArray& operator=(VlAssocArray&&) = default;
// METHODS // METHODS
T_Value& atDefault() { return m_defaultValue; } T_Value& atDefault() { return m_defaultValue; }

View File

@ -64,7 +64,11 @@ public:
VerilatedMsg(const std::function<void()>& cb) VerilatedMsg(const std::function<void()>& cb)
: m_mtaskId{Verilated::mtaskId()} : m_mtaskId{Verilated::mtaskId()}
, m_cb{cb} {} , m_cb{cb} {}
~VerilatedMsg() {} ~VerilatedMsg() = default;
VerilatedMsg(const VerilatedMsg&) = default;
VerilatedMsg(VerilatedMsg&&) = default;
VerilatedMsg& operator=(const VerilatedMsg&) = default;
VerilatedMsg& operator=(VerilatedMsg&&) = default;
// METHODS // METHODS
vluint32_t mtaskId() const { return m_mtaskId; } vluint32_t mtaskId() const { return m_mtaskId; }
/// Execute the lambda function /// Execute the lambda function
@ -87,7 +91,7 @@ public:
: m_depth{0} { : m_depth{0} {
assert(atomic_is_lock_free(&m_depth)); assert(atomic_is_lock_free(&m_depth));
} }
~VerilatedEvalMsgQueue() {} ~VerilatedEvalMsgQueue() = default;
private: private:
VL_UNCOPYABLE(VerilatedEvalMsgQueue); VL_UNCOPYABLE(VerilatedEvalMsgQueue);
@ -207,8 +211,8 @@ protected:
int m_timeFormatPrecision = 0; // $timeformat number of decimal places int m_timeFormatPrecision = 0; // $timeformat number of decimal places
int m_timeFormatWidth = 20; // $timeformat character width int m_timeFormatWidth = 20; // $timeformat character width
enum { UNITS_NONE = 99 }; // Default based on precision enum { UNITS_NONE = 99 }; // Default based on precision
Serialized() {} Serialized() = default;
~Serialized() {} ~Serialized() = default;
} m_ser; } m_ser;
VerilatedMutex m_sergMutex; ///< Protect m_ser VerilatedMutex m_sergMutex; ///< Protect m_ser
@ -275,8 +279,8 @@ protected:
public: // But only for verilated*.cpp public: // But only for verilated*.cpp
// CONSTRUCTORS // CONSTRUCTORS
VerilatedImp() {} VerilatedImp() = default;
~VerilatedImp() {} ~VerilatedImp() = default;
static void setup(); static void setup();
static void teardown(); static void teardown();

View File

@ -160,7 +160,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
VerilatedSave() {} VerilatedSave() = default;
virtual ~VerilatedSave() override { close(); } virtual ~VerilatedSave() override { close(); }
// METHODS // METHODS
/// Open the file; call isOpen() to see if errors /// Open the file; call isOpen() to see if errors
@ -180,7 +180,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
VerilatedRestore() {} VerilatedRestore() = default;
virtual ~VerilatedRestore() override { close(); } virtual ~VerilatedRestore() override { close(); }
// METHODS // METHODS

View File

@ -43,7 +43,7 @@ class VerilatedRange {
protected: protected:
friend class VerilatedVarProps; friend class VerilatedVarProps;
friend class VerilatedScope; friend class VerilatedScope;
VerilatedRange() {} VerilatedRange() = default;
VerilatedRange(int left, int right) VerilatedRange(int left, int right)
: m_left{left} : m_left{left}
, m_right{right} {} , m_right{right} {}
@ -53,7 +53,7 @@ protected:
} }
public: public:
~VerilatedRange() {} ~VerilatedRange() = default;
int left() const { return m_left; } int left() const { return m_left; }
int right() const { return m_right; } int right() const { return m_right; }
int low() const { return (m_left < m_right) ? m_left : m_right; } int low() const { return (m_left < m_right) ? m_left : m_right; }
@ -136,7 +136,7 @@ public:
} }
public: public:
~VerilatedVarProps() {} ~VerilatedVarProps() = default;
// METHODS // METHODS
bool magicOk() const { return m_magic == MAGIC; } bool magicOk() const { return m_magic == MAGIC; }
VerilatedVarType vltype() const { return m_vltype; } VerilatedVarType vltype() const { return m_vltype; }
@ -199,7 +199,7 @@ public:
VerilatedDpiOpenVar(const VerilatedVarProps* propsp, const void* datap) VerilatedDpiOpenVar(const VerilatedVarProps* propsp, const void* datap)
: m_propsp{propsp} : m_propsp{propsp}
, m_datap{const_cast<void*>(datap)} {} , m_datap{const_cast<void*>(datap)} {}
~VerilatedDpiOpenVar() {} ~VerilatedDpiOpenVar() = default;
// METHODS // METHODS
void* datap() const { return m_datap; } void* datap() const { return m_datap; }
// METHODS - from VerilatedVarProps // METHODS - from VerilatedVarProps
@ -241,7 +241,7 @@ protected:
, m_isParam{isParam} {} , m_isParam{isParam} {}
public: public:
~VerilatedVar() {} ~VerilatedVar() = default;
// ACCESSORS // ACCESSORS
void* datap() const { return m_datap; } void* datap() const { return m_datap; }
const VerilatedRange& range() const { return packed(); } // Deprecated const VerilatedRange& range() const { return packed(); } // Deprecated

View File

@ -45,23 +45,23 @@ struct VerilatedCStrCmp {
class VerilatedScopeNameMap class VerilatedScopeNameMap
: public std::map<const char*, const VerilatedScope*, VerilatedCStrCmp> { : public std::map<const char*, const VerilatedScope*, VerilatedCStrCmp> {
public: public:
VerilatedScopeNameMap() {} VerilatedScopeNameMap() = default;
~VerilatedScopeNameMap() {} ~VerilatedScopeNameMap() = default;
}; };
/// Map of sorted variable names to find associated variable class /// Map of sorted variable names to find associated variable class
class VerilatedVarNameMap : public std::map<const char*, VerilatedVar, VerilatedCStrCmp> { class VerilatedVarNameMap : public std::map<const char*, VerilatedVar, VerilatedCStrCmp> {
public: public:
VerilatedVarNameMap() {} VerilatedVarNameMap() = default;
~VerilatedVarNameMap() {} ~VerilatedVarNameMap() = default;
}; };
typedef std::vector<const VerilatedScope*> VerilatedScopeVector; typedef std::vector<const VerilatedScope*> VerilatedScopeVector;
class VerilatedHierarchyMap : public std::map<const VerilatedScope*, VerilatedScopeVector> { class VerilatedHierarchyMap : public std::map<const VerilatedScope*, VerilatedScopeVector> {
public: public:
VerilatedHierarchyMap() {} VerilatedHierarchyMap() = default;
~VerilatedHierarchyMap() {} ~VerilatedHierarchyMap() = default;
}; };
#endif // Guard #endif // Guard

View File

@ -82,7 +82,7 @@ public:
// that must notify this MTaskVertex before it will become ready // that must notify this MTaskVertex before it will become ready
// to run. // to run.
explicit VlMTaskVertex(vluint32_t upstreamDepCount); explicit VlMTaskVertex(vluint32_t upstreamDepCount);
~VlMTaskVertex() {} ~VlMTaskVertex() = default;
static vluint64_t yields() { return s_yields; } static vluint64_t yields() { return s_yields; }
static void yieldThread() { static void yieldThread() {
@ -136,7 +136,7 @@ protected:
unsigned m_cpu; // Execution CPU number (at start anyways) unsigned m_cpu; // Execution CPU number (at start anyways)
public: public:
class Barrier {}; class Barrier {};
VlProfileRec() {} VlProfileRec() = default;
explicit VlProfileRec(Barrier) { m_cpu = getcpu(); } explicit VlProfileRec(Barrier) { m_cpu = getcpu(); }
void startRecord(vluint64_t time, uint32_t mtask, uint32_t predict) { void startRecord(vluint64_t time, uint32_t mtask, uint32_t predict) {
m_type = VlProfileRec::TYPE_MTASK_RUN; m_type = VlProfileRec::TYPE_MTASK_RUN;

View File

@ -39,8 +39,8 @@ private:
int m_fd = 0; ///< File descriptor we're writing to int m_fd = 0; ///< File descriptor we're writing to
public: public:
// METHODS // METHODS
VerilatedVcdFile() {} VerilatedVcdFile() = default;
virtual ~VerilatedVcdFile() {} virtual ~VerilatedVcdFile() = default;
virtual bool open(const std::string& name) VL_MT_UNSAFE; virtual bool open(const std::string& name) VL_MT_UNSAFE;
virtual void close() VL_MT_UNSAFE; virtual void close() VL_MT_UNSAFE;
virtual ssize_t write(const char* bufp, ssize_t len) VL_MT_UNSAFE; virtual ssize_t write(const char* bufp, ssize_t len) VL_MT_UNSAFE;

View File

@ -61,8 +61,8 @@ class VerilatedVpio {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
VerilatedVpio() {} VerilatedVpio() = default;
virtual ~VerilatedVpio() {} virtual ~VerilatedVpio() = default;
inline static void* operator new(size_t size) VL_MT_SAFE { inline static void* operator new(size_t size) VL_MT_SAFE {
// We new and delete tons of vpi structures, so keep them around // We new and delete tons of vpi structures, so keep them around
// To simplify our free list, we use a size large enough for all derived types // To simplify our free list, we use a size large enough for all derived types
@ -114,7 +114,7 @@ public:
m_value.format = cbDatap->value ? cbDatap->value->format : vpiSuppressVal; m_value.format = cbDatap->value ? cbDatap->value->format : vpiSuppressVal;
m_cbData.value = &m_value; m_cbData.value = &m_value;
} }
virtual ~VerilatedVpioCb() override {} virtual ~VerilatedVpioCb() override = default;
static inline VerilatedVpioCb* castp(vpiHandle h) { static inline VerilatedVpioCb* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioCb*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioCb*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -131,7 +131,7 @@ class VerilatedVpioConst : public VerilatedVpio {
public: public:
explicit VerilatedVpioConst(vlsint32_t num) explicit VerilatedVpioConst(vlsint32_t num)
: m_num{num} {} : m_num{num} {}
virtual ~VerilatedVpioConst() override {} virtual ~VerilatedVpioConst() override = default;
static inline VerilatedVpioConst* castp(vpiHandle h) { static inline VerilatedVpioConst* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioConst*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioConst*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -148,7 +148,7 @@ public:
: m_varp{varp} : m_varp{varp}
, m_scopep{scopep} {} , m_scopep{scopep} {}
virtual ~VerilatedVpioParam() override {} virtual ~VerilatedVpioParam() override = default;
static inline VerilatedVpioParam* castp(vpiHandle h) { static inline VerilatedVpioParam* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioParam*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioParam*>(reinterpret_cast<VerilatedVpio*>(h));
@ -172,7 +172,7 @@ class VerilatedVpioRange : public VerilatedVpio {
public: public:
explicit VerilatedVpioRange(const VerilatedRange* range) explicit VerilatedVpioRange(const VerilatedRange* range)
: m_range{range} {} : m_range{range} {}
virtual ~VerilatedVpioRange() override {} virtual ~VerilatedVpioRange() override = default;
static inline VerilatedVpioRange* castp(vpiHandle h) { static inline VerilatedVpioRange* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioRange*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioRange*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -198,7 +198,7 @@ protected:
public: public:
explicit VerilatedVpioScope(const VerilatedScope* scopep) explicit VerilatedVpioScope(const VerilatedScope* scopep)
: m_scopep{scopep} {} : m_scopep{scopep} {}
virtual ~VerilatedVpioScope() override {} virtual ~VerilatedVpioScope() override = default;
static inline VerilatedVpioScope* castp(vpiHandle h) { static inline VerilatedVpioScope* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioScope*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioScope*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -274,7 +274,7 @@ public:
m_index = index; m_index = index;
m_varDatap = (static_cast<vluint8_t*>(varp->datap())) + entSize() * offset; m_varDatap = (static_cast<vluint8_t*>(varp->datap())) + entSize() * offset;
} }
virtual ~VerilatedVpioMemoryWord() override {} virtual ~VerilatedVpioMemoryWord() override = default;
static inline VerilatedVpioMemoryWord* castp(vpiHandle h) { static inline VerilatedVpioMemoryWord* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioMemoryWord*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioMemoryWord*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -298,7 +298,7 @@ class VerilatedVpioVarIter : public VerilatedVpio {
public: public:
explicit VerilatedVpioVarIter(const VerilatedScope* scopep) explicit VerilatedVpioVarIter(const VerilatedScope* scopep)
: m_scopep{scopep} {} : m_scopep{scopep} {}
virtual ~VerilatedVpioVarIter() override {} virtual ~VerilatedVpioVarIter() override = default;
static inline VerilatedVpioVarIter* castp(vpiHandle h) { static inline VerilatedVpioVarIter* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioVarIter*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioVarIter*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -334,7 +334,7 @@ public:
, m_varp{varp} , m_varp{varp}
, m_iteration{varp->unpacked().right()} , m_iteration{varp->unpacked().right()}
, m_direction{VL_LIKELY(varp->unpacked().left() > varp->unpacked().right()) ? 1 : -1} {} , m_direction{VL_LIKELY(varp->unpacked().left() > varp->unpacked().right()) ? 1 : -1} {}
virtual ~VerilatedVpioMemoryWordIter() override {} virtual ~VerilatedVpioMemoryWordIter() override = default;
static inline VerilatedVpioMemoryWordIter* castp(vpiHandle h) { static inline VerilatedVpioMemoryWordIter* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioMemoryWordIter*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioMemoryWordIter*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -379,7 +379,7 @@ public:
: m_vec{&vec} { : m_vec{&vec} {
m_it = m_vec->begin(); m_it = m_vec->begin();
} }
virtual ~VerilatedVpioModuleIter() override {} virtual ~VerilatedVpioModuleIter() override = default;
static inline VerilatedVpioModuleIter* castp(vpiHandle h) { static inline VerilatedVpioModuleIter* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioModuleIter*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioModuleIter*>(reinterpret_cast<VerilatedVpio*>(h));
} }
@ -422,8 +422,8 @@ class VerilatedVpiImp {
static VerilatedVpiImp s_s; // Singleton static VerilatedVpiImp s_s; // Singleton
public: public:
VerilatedVpiImp() {} VerilatedVpiImp() = default;
~VerilatedVpiImp() {} ~VerilatedVpiImp() = default;
static void assertOneCheck() { s_s.m_assertOne.check(); } static void assertOneCheck() { s_s.m_assertOne.check(); }
static void cbReasonAdd(VerilatedVpioCb* vop) { static void cbReasonAdd(VerilatedVpioCb* vop) {
if (vop->reason() == cbValueChange) { if (vop->reason() == cbValueChange) {
@ -553,7 +553,7 @@ public:
m_buff[0] = '\0'; m_buff[0] = '\0';
m_errorInfo.product = const_cast<PLI_BYTE8*>(Verilated::productName()); m_errorInfo.product = const_cast<PLI_BYTE8*>(Verilated::productName());
} }
~VerilatedVpiError() {} ~VerilatedVpiError() = default;
static void selfTest() VL_MT_UNSAFE_ONE; static void selfTest() VL_MT_UNSAFE_ONE;
VerilatedVpiError* setMessage(PLI_INT32 level) { VerilatedVpiError* setMessage(PLI_INT32 level) {
m_flag = true; m_flag = true;

View File

@ -130,8 +130,8 @@ public:
} }
// CONSTRUCTORS // CONSTRUCTORS
ActiveNamer() {} ActiveNamer() = default;
virtual ~ActiveNamer() override {} virtual ~ActiveNamer() override = default;
void main(AstScope* nodep) { iterate(nodep); } void main(AstScope* nodep) { iterate(nodep); }
}; };
@ -205,7 +205,7 @@ public:
, m_alwaysp{nodep} { , m_alwaysp{nodep} {
iterate(nodep); iterate(nodep);
} }
virtual ~ActiveDlyVisitor() override {} virtual ~ActiveDlyVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -406,7 +406,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit ActiveVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ActiveVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ActiveVisitor() override {} virtual ~ActiveVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -128,7 +128,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit ActiveTopVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ActiveTopVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ActiveTopVisitor() override {} virtual ~ActiveTopVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -197,7 +197,7 @@ public:
// Process // Process
iterate(nodep); iterate(nodep);
} }
virtual ~AssertPreVisitor() override {} virtual ~AssertPreVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -1010,7 +1010,7 @@ public:
: mu_flags{0} { : mu_flags{0} {
init((right > left) ? right : left, (right > left) ? left : right, (right > left)); init((right > left) ? right : left, (right > left) ? left : right, (right > left));
} }
~VNumRange() {} ~VNumRange() = default;
// MEMBERS // MEMBERS
void init(int hi, int lo, bool littleEndian) { void init(int hi, int lo, bool littleEndian) {
m_hi = hi; m_hi = hi;
@ -1112,7 +1112,7 @@ public:
, m_numeric{numeric} , m_numeric{numeric}
, m_keyword{kwd} , m_keyword{kwd}
, m_nrange{nrange} {} , m_nrange{nrange} {}
~VBasicTypeKey() {} ~VBasicTypeKey() = default;
}; };
//###################################################################### //######################################################################
@ -1138,7 +1138,7 @@ public:
m_u.ui = i; m_u.ui = i;
} }
explicit VNUser(void* p) { m_u.up = p; } explicit VNUser(void* p) { m_u.up = p; }
~VNUser() {} ~VNUser() = default;
// Casters // Casters
WidthVP* c() const { return reinterpret_cast<WidthVP*>(m_u.up); } WidthVP* c() const { return reinterpret_cast<WidthVP*>(m_u.up); }
VSymEnt* toSymEnt() const { return reinterpret_cast<VSymEnt*>(m_u.up); } VSymEnt* toSymEnt() const { return reinterpret_cast<VSymEnt*>(m_u.up); }
@ -1315,7 +1315,7 @@ protected:
AstNode** m_iterpp = nullptr; AstNode** m_iterpp = nullptr;
public: public:
AstNRelinker() {} AstNRelinker() = default;
void relink(AstNode* newp); void relink(AstNode* newp);
AstNode* oldp() const { return m_oldp; } AstNode* oldp() const { return m_oldp; }
void dump(std::ostream& str = std::cout) const; void dump(std::ostream& str = std::cout) const;
@ -1538,7 +1538,7 @@ public:
bool brokeExistsBelow() const; bool brokeExistsBelow() const;
// CONSTRUCTORS // CONSTRUCTORS
virtual ~AstNode() {} virtual ~AstNode() = default;
#ifdef VL_LEAK_CHECKS #ifdef VL_LEAK_CHECKS
static void* operator new(size_t size); static void* operator new(size_t size);
static void operator delete(void* obj, size_t size); static void operator delete(void* obj, size_t size);
@ -1905,7 +1905,7 @@ inline void AstNRelinker::relink(AstNode* newp) { newp->AstNode::relink(this); }
//=== AstNode* : Derived generic node types //=== AstNode* : Derived generic node types
#define ASTNODE_BASE_FUNCS(name) \ #define ASTNODE_BASE_FUNCS(name) \
virtual ~Ast##name() {} \ virtual ~Ast##name() override = default; \
static Ast##name* cloneTreeNull(Ast##name* nodep, bool cloneNextLink) { \ static Ast##name* cloneTreeNull(Ast##name* nodep, bool cloneNextLink) { \
return nodep ? nodep->cloneTree(cloneNextLink) : nullptr; \ return nodep ? nodep->cloneTree(cloneNextLink) : nullptr; \
} \ } \

View File

@ -36,7 +36,7 @@
Ast##name* clonep() const { return static_cast<Ast##name*>(AstNode::clonep()); } Ast##name* clonep() const { return static_cast<Ast##name*>(AstNode::clonep()); }
#define ASTNODE_NODE_FUNCS(name) \ #define ASTNODE_NODE_FUNCS(name) \
virtual ~Ast##name() override {} \ virtual ~Ast##name() override = default; \
ASTNODE_NODE_FUNCS_NO_DTOR(name) ASTNODE_NODE_FUNCS_NO_DTOR(name)
//###################################################################### //######################################################################

View File

@ -45,8 +45,8 @@ private:
bool m_anyFuncInBegin = false; bool m_anyFuncInBegin = false;
public: public:
BeginState() {} BeginState() = default;
~BeginState() {} ~BeginState() = default;
void userMarkChanged(AstNode* nodep) { void userMarkChanged(AstNode* nodep) {
nodep->user1(true); nodep->user1(true);
m_anyFuncInBegin = true; m_anyFuncInBegin = true;
@ -242,7 +242,7 @@ public:
: m_statep{statep} { : m_statep{statep} {
iterate(nodep); iterate(nodep);
} }
virtual ~BeginVisitor() override {} virtual ~BeginVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -283,7 +283,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
BeginRelinkVisitor(AstNetlist* nodep, BeginState*) { iterate(nodep); } BeginRelinkVisitor(AstNetlist* nodep, BeginState*) { iterate(nodep); }
virtual ~BeginRelinkVisitor() override {} virtual ~BeginRelinkVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -118,7 +118,7 @@ public:
iterateChildren(nodep); iterateChildren(nodep);
calc_tasks(); calc_tasks();
} }
virtual ~BranchVisitor() override {} virtual ~BranchVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -190,8 +190,8 @@ public:
} }
// CONSTRUCTORS // CONSTRUCTORS
BrokenTable() {} BrokenTable() = default;
virtual ~BrokenTable() override {} virtual ~BrokenTable() override = default;
}; };
BrokenTable::NodeMap BrokenTable::s_nodes; BrokenTable::NodeMap BrokenTable::s_nodes;
@ -231,7 +231,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit BrokenMarkVisitor(AstNetlist* nodep) { iterate(nodep); } explicit BrokenMarkVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~BrokenMarkVisitor() override {} virtual ~BrokenMarkVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -304,7 +304,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit BrokenCheckVisitor(AstNetlist* nodep) { iterate(nodep); } explicit BrokenCheckVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~BrokenCheckVisitor() override {} virtual ~BrokenCheckVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -87,7 +87,7 @@ public:
m_funcp = m_tlFuncp; m_funcp = m_tlFuncp;
m_modp->addStmtp(m_tlFuncp); m_modp->addStmtp(m_tlFuncp);
} }
~V3CCtorsVisitor() {} ~V3CCtorsVisitor() = default;
private: private:
VL_UNCOPYABLE(V3CCtorsVisitor); VL_UNCOPYABLE(V3CCtorsVisitor);

View File

@ -68,7 +68,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CUseState(AstNodeModule* nodep) explicit CUseState(AstNodeModule* nodep)
: m_modInsertp{nodep} {} : m_modInsertp{nodep} {}
virtual ~CUseState() {} virtual ~CUseState() = default;
VL_UNCOPYABLE(CUseState); VL_UNCOPYABLE(CUseState);
}; };
@ -109,7 +109,7 @@ public:
: m_stater(stater) { // Need () or GCC 4.8 false warning : m_stater(stater) { // Need () or GCC 4.8 false warning
iterate(nodep); iterate(nodep);
} }
virtual ~CUseDTypeVisitor() override {} virtual ~CUseDTypeVisitor() override = default;
VL_UNCOPYABLE(CUseDTypeVisitor); VL_UNCOPYABLE(CUseDTypeVisitor);
}; };
@ -219,7 +219,7 @@ public:
: m_state{nodep} { : m_state{nodep} {
iterate(nodep); iterate(nodep);
} }
virtual ~CUseVisitor() override {} virtual ~CUseVisitor() override = default;
VL_UNCOPYABLE(CUseVisitor); VL_UNCOPYABLE(CUseVisitor);
}; };

View File

@ -111,7 +111,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CaseLintVisitor(AstNodeCase* nodep) { iterate(nodep); } explicit CaseLintVisitor(AstNodeCase* nodep) { iterate(nodep); }
virtual ~CaseLintVisitor() override {} virtual ~CaseLintVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -193,7 +193,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CastVisitor(AstNetlist* nodep) { iterate(nodep); } explicit CastVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~CastVisitor() override {} virtual ~CastVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -66,7 +66,7 @@ public:
, m_srcDomainSet{false} , m_srcDomainSet{false}
, m_dstDomainSet{false} , m_dstDomainSet{false}
, m_asyncPath{false} {} , m_asyncPath{false} {}
virtual ~CdcEitherVertex() override {} virtual ~CdcEitherVertex() override = default;
// ACCESSORS // ACCESSORS
virtual FileLine* fileline() const override { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
AstScope* scopep() const { return m_scopep; } AstScope* scopep() const { return m_scopep; }
@ -92,7 +92,7 @@ public:
CdcVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) CdcVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: CdcEitherVertex{graphp, scopep, varScp} : CdcEitherVertex{graphp, scopep, varScp}
, m_varScp{varScp} {} , m_varScp{varScp} {}
virtual ~CdcVarVertex() override {} virtual ~CdcVarVertex() override = default;
// ACCESSORS // ACCESSORS
AstVarScope* varScp() const { return m_varScp; } AstVarScope* varScp() const { return m_varScp; }
virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); } virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
@ -117,7 +117,7 @@ public:
srcDomainp(sensenodep); srcDomainp(sensenodep);
dstDomainp(sensenodep); dstDomainp(sensenodep);
} }
virtual ~CdcLogicVertex() override {} virtual ~CdcLogicVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string name() const override { virtual string name() const override {
return (cvtToHex(nodep()) + "@" + scopep()->prettyName()); return (cvtToHex(nodep()) + "@" + scopep()->prettyName());
@ -170,7 +170,7 @@ public:
, m_prefix{prefix} { , m_prefix{prefix} {
iterate(nodep); iterate(nodep);
} }
virtual ~CdcDumpVisitor() override {} virtual ~CdcDumpVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -194,7 +194,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CdcWidthVisitor(AstNode* nodep) { iterate(nodep); } explicit CdcWidthVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~CdcWidthVisitor() override {} virtual ~CdcWidthVisitor() override = default;
// ACCESSORS // ACCESSORS
int maxWidth() const { int maxWidth() const {
size_t width = 1; size_t width = 1;

View File

@ -48,8 +48,8 @@ public:
int m_numStmts = 0; // Number of statements added to m_chgFuncp int m_numStmts = 0; // Number of statements added to m_chgFuncp
int m_funcNum = 0; // Number of change functions emitted int m_funcNum = 0; // Number of change functions emitted
ChangedState() {} ChangedState() = default;
~ChangedState() {} ~ChangedState() = default;
void maybeCreateChgFuncp() { void maybeCreateChgFuncp() {
// Don't create an extra function call if splitting is disabled // Don't create an extra function call if splitting is disabled
@ -208,7 +208,7 @@ public:
m_newLvEqnp->deleteTree(); m_newLvEqnp->deleteTree();
m_newRvEqnp->deleteTree(); m_newRvEqnp->deleteTree();
} }
virtual ~ChangedInsertVisitor() override {} virtual ~ChangedInsertVisitor() override = default;
VL_UNCOPYABLE(ChangedInsertVisitor); VL_UNCOPYABLE(ChangedInsertVisitor);
}; };
@ -280,7 +280,7 @@ public:
: m_statep{statep} { : m_statep{statep} {
iterate(nodep); iterate(nodep);
} }
virtual ~ChangedVisitor() override {} virtual ~ChangedVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -305,7 +305,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CleanVisitor(AstNetlist* nodep) { iterate(nodep); } explicit CleanVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~CleanVisitor() override {} virtual ~CleanVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -454,7 +454,7 @@ public:
// easily without iterating through the tree. // easily without iterating through the tree.
nodep->evalp(m_evalFuncp); nodep->evalp(m_evalFuncp);
} }
virtual ~ClockVisitor() override {} virtual ~ClockVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -56,7 +56,7 @@ protected:
// STATE // STATE
// METHODS // METHODS
virtual ~CombBaseVisitor() override {} virtual ~CombBaseVisitor() override = default;
VL_DEBUG_FUNC; // Declare debug() VL_DEBUG_FUNC; // Declare debug()
}; };
@ -131,8 +131,8 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
CombCallVisitor() {} CombCallVisitor() = default;
virtual ~CombCallVisitor() override {} virtual ~CombCallVisitor() override = default;
void main(AstNetlist* nodep) { iterate(nodep); } void main(AstNetlist* nodep) { iterate(nodep); }
}; };
@ -153,7 +153,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CombMarkVisitor(AstNode* nodep) { iterate(nodep); } explicit CombMarkVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~CombMarkVisitor() override {} virtual ~CombMarkVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -38,8 +38,8 @@ template <typename T> class V3ConfigWildcardResolver {
Map m_mapWildcard; // Wildcard strings to entities Map m_mapWildcard; // Wildcard strings to entities
Map m_mapResolved; // Resolved strings to converged entities Map m_mapResolved; // Resolved strings to converged entities
public: public:
V3ConfigWildcardResolver() {} V3ConfigWildcardResolver() = default;
~V3ConfigWildcardResolver() {} ~V3ConfigWildcardResolver() = default;
/// Update into maps from other /// Update into maps from other
void update(const V3ConfigWildcardResolver& other) { void update(const V3ConfigWildcardResolver& other) {
@ -123,7 +123,7 @@ class V3ConfigFTask {
bool m_public = false; // Public function/task bool m_public = false; // Public function/task
public: public:
V3ConfigFTask() {} V3ConfigFTask() = default;
void update(const V3ConfigFTask& f) { void update(const V3ConfigFTask& f) {
// Don't overwrite true with false // Don't overwrite true with false
if (f.m_isolate) m_isolate = true; if (f.m_isolate) m_isolate = true;
@ -165,7 +165,7 @@ class V3ConfigModule {
bool m_inlineValue = false; // The inline value (on/off) bool m_inlineValue = false; // The inline value (on/off)
public: public:
V3ConfigModule() {} V3ConfigModule() = default;
void update(const V3ConfigModule& m) { void update(const V3ConfigModule& m) {
m_tasks.update(m.m_tasks); m_tasks.update(m.m_tasks);
@ -233,7 +233,7 @@ public:
: m_lineno{lineno} : m_lineno{lineno}
, m_code{code} , m_code{code}
, m_on{on} {} , m_on{on} {}
~V3ConfigIgnoresLine() {} ~V3ConfigIgnoresLine() = default;
inline bool operator<(const V3ConfigIgnoresLine& rh) const { inline bool operator<(const V3ConfigIgnoresLine& rh) const {
if (m_lineno < rh.m_lineno) return true; if (m_lineno < rh.m_lineno) return true;
if (m_lineno > rh.m_lineno) return false; if (m_lineno > rh.m_lineno) return false;
@ -352,8 +352,8 @@ class V3ConfigResolver {
V3ConfigFileResolver m_files; // Access to file names (with wildcards) V3ConfigFileResolver m_files; // Access to file names (with wildcards)
static V3ConfigResolver s_singleton; // Singleton (not via local static, as that's slow) static V3ConfigResolver s_singleton; // Singleton (not via local static, as that's slow)
V3ConfigResolver() {} V3ConfigResolver() = default;
~V3ConfigResolver() {} ~V3ConfigResolver() = default;
public: public:
inline static V3ConfigResolver& s() { return s_singleton; } inline static V3ConfigResolver& s() { return s_singleton; }

View File

@ -52,7 +52,7 @@ public:
AstNode::user4ClearTree(); // Check marked InUse before we're called AstNode::user4ClearTree(); // Check marked InUse before we're called
iterate(nodep); iterate(nodep);
} }
virtual ~ConstVarMarkVisitor() override {} virtual ~ConstVarMarkVisitor() override = default;
}; };
class ConstVarFindVisitor : public AstNVisitor { class ConstVarFindVisitor : public AstNVisitor {
@ -71,7 +71,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit ConstVarFindVisitor(AstNode* nodep) { iterateAndNextNull(nodep); } explicit ConstVarFindVisitor(AstNode* nodep) { iterateAndNextNull(nodep); }
virtual ~ConstVarFindVisitor() override {} virtual ~ConstVarFindVisitor() override = default;
// METHODS // METHODS
bool found() const { return m_found; } bool found() const { return m_found; }
}; };
@ -2563,7 +2563,7 @@ public:
} }
// clang-format on // clang-format on
} }
virtual ~ConstVisitor() override {} virtual ~ConstVisitor() override = default;
AstNode* mainAcceptEdit(AstNode* nodep) { AstNode* mainAcceptEdit(AstNode* nodep) {
// Operate starting at a random place // Operate starting at a random place
return iterateSubtreeReturnEdits(nodep); return iterateSubtreeReturnEdits(nodep);

View File

@ -52,7 +52,7 @@ private:
: m_comment{comment} : m_comment{comment}
, m_varRefp{vp} , m_varRefp{vp}
, m_chgRefp{cp} {} , m_chgRefp{cp} {}
~ToggleEnt() {} ~ToggleEnt() = default;
void cleanup() { void cleanup() {
VL_DO_CLEAR(m_varRefp->deleteTree(), m_varRefp = nullptr); VL_DO_CLEAR(m_varRefp->deleteTree(), m_varRefp = nullptr);
VL_DO_CLEAR(m_chgRefp->deleteTree(), m_chgRefp = nullptr); VL_DO_CLEAR(m_chgRefp->deleteTree(), m_chgRefp = nullptr);
@ -64,7 +64,7 @@ private:
bool m_inModOff = false; // In module with no coverage bool m_inModOff = false; // In module with no coverage
int m_handle = 0; // Opaque handle for index into line tracking int m_handle = 0; // Opaque handle for index into line tracking
const AstNode* m_nodep = nullptr; // Node establishing this state const AstNode* m_nodep = nullptr; // Node establishing this state
CheckState() {} CheckState() = default;
bool lineCoverageOn(const AstNode* nodep) const { bool lineCoverageOn(const AstNode* nodep) const {
return m_on && !m_inModOff && nodep->fileline()->coverageOn() return m_on && !m_inModOff && nodep->fileline()->coverageOn()
&& v3Global.opt.coverageLine(); && v3Global.opt.coverageLine();
@ -534,7 +534,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CoverageVisitor(AstNetlist* rootp) { iterateChildren(rootp); } explicit CoverageVisitor(AstNetlist* rootp) { iterateChildren(rootp); }
virtual ~CoverageVisitor() override {} virtual ~CoverageVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -63,7 +63,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit DeadModVisitor(AstNodeModule* nodep) { iterate(nodep); } explicit DeadModVisitor(AstNodeModule* nodep) { iterate(nodep); }
virtual ~DeadModVisitor() override {} virtual ~DeadModVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -461,7 +461,7 @@ public:
// We may have removed some datatypes, cleanup // We may have removed some datatypes, cleanup
nodep->typeTablep()->repairCache(); nodep->typeTablep()->repairCache();
} }
virtual ~DeadVisitor() override {} virtual ~DeadVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -155,7 +155,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit DepthVisitor(AstNetlist* nodep) { iterate(nodep); } explicit DepthVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~DepthVisitor() override {} virtual ~DepthVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -117,7 +117,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit DepthBlockVisitor(AstNetlist* nodep) { iterate(nodep); } explicit DepthBlockVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~DepthBlockVisitor() override {} virtual ~DepthBlockVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -296,7 +296,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit DescopeVisitor(AstNetlist* nodep) { iterate(nodep); } explicit DescopeVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~DescopeVisitor() override {} virtual ~DescopeVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -1258,7 +1258,7 @@ public:
m_trackText = trackText; m_trackText = trackText;
iterate(nodep); iterate(nodep);
} }
virtual ~EmitCStmts() override {} virtual ~EmitCStmts() override = default;
}; };
//###################################################################### //######################################################################
@ -1276,7 +1276,7 @@ public:
: m_mtaskIds(mtaskIds) { // Cannot be {} or GCC 4.8 false warning : m_mtaskIds(mtaskIds) { // Cannot be {} or GCC 4.8 false warning
m_serial = ++m_serialNext; // Cannot be ()/{} or GCC 4.8 false warning m_serial = ++m_serialNext; // Cannot be ()/{} or GCC 4.8 false warning
} }
virtual ~EmitVarTspSorter() {} virtual ~EmitVarTspSorter() = default;
// METHODS // METHODS
virtual bool operator<(const TspStateBase& other) const override { virtual bool operator<(const TspStateBase& other) const override {
return operator<(dynamic_cast<const EmitVarTspSorter&>(other)); return operator<(dynamic_cast<const EmitVarTspSorter&>(other));
@ -1840,8 +1840,8 @@ class EmitCImp : EmitCStmts {
void maybeSplit(AstNodeModule* modp); void maybeSplit(AstNodeModule* modp);
public: public:
EmitCImp() {} EmitCImp() = default;
virtual ~EmitCImp() override {} virtual ~EmitCImp() override = default;
void mainImp(AstNodeModule* modp, bool slow); void mainImp(AstNodeModule* modp, bool slow);
void mainInt(AstNodeModule* modp); void mainInt(AstNodeModule* modp);
void mainDoFunc(AstCFunc* nodep) { iterate(nodep); } void mainDoFunc(AstCFunc* nodep) { iterate(nodep); }
@ -3840,7 +3840,7 @@ class EmitCTrace : EmitCStmts {
public: public:
explicit EmitCTrace(bool slow) explicit EmitCTrace(bool slow)
: m_slow{slow} {} : m_slow{slow} {}
virtual ~EmitCTrace() override {} virtual ~EmitCTrace() override = default;
void main() { void main() {
// Put out the file // Put out the file
newOutCFile(0); newOutCFile(0);

View File

@ -106,8 +106,8 @@ public:
} }
// CONSTRUCTORS // CONSTRUCTORS
EmitCBaseVisitor() {} EmitCBaseVisitor() = default;
virtual ~EmitCBaseVisitor() override {} virtual ~EmitCBaseVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -126,7 +126,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit EmitCBaseCounterVisitor(AstNode* nodep) { iterate(nodep); } explicit EmitCBaseCounterVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~EmitCBaseCounterVisitor() override {} virtual ~EmitCBaseCounterVisitor() override = default;
int count() const { return m_count; } int count() const { return m_count; }
}; };

View File

@ -256,7 +256,7 @@ class CMakeEmitter {
public: public:
explicit CMakeEmitter() { emitOverallCMake(); } explicit CMakeEmitter() { emitOverallCMake(); }
virtual ~CMakeEmitter() {} virtual ~CMakeEmitter() = default;
}; };
void V3EmitCMake::emit() { void V3EmitCMake::emit() {

View File

@ -467,7 +467,7 @@ void EmitCSyms::emitSymHdr() {
puts("\n// CREATORS\n"); puts("\n// CREATORS\n");
puts(symClassName() + "(" + topClassName() + "* topp, const char* namep);\n"); puts(symClassName() + "(" + topClassName() + "* topp, const char* namep);\n");
puts(string("~") + symClassName() + "() {}\n"); puts(string("~") + symClassName() + "() = default;\n");
for (const auto& i : m_usesVfinal) { for (const auto& i : m_usesVfinal) {
puts("void " + symClassName() + "_" + cvtToStr(i.first) + "("); puts("void " + symClassName() + "_" + cvtToStr(i.first) + "(");

View File

@ -285,7 +285,7 @@ public:
emitClassMake(); emitClassMake();
emitOverallMake(); emitOverallMake();
} }
virtual ~EmitMk() {} virtual ~EmitMk() = default;
}; };
//###################################################################### //######################################################################

View File

@ -667,7 +667,7 @@ public:
explicit EmitVBaseVisitor(bool suppressUnknown, AstSenTree* domainp) explicit EmitVBaseVisitor(bool suppressUnknown, AstSenTree* domainp)
: m_suppressUnknown{suppressUnknown} : m_suppressUnknown{suppressUnknown}
, m_sensesp{domainp} {} , m_sensesp{domainp} {}
virtual ~EmitVBaseVisitor() override {} virtual ~EmitVBaseVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -693,7 +693,7 @@ public:
m_suppressVarSemi = suppressVarSemi; m_suppressVarSemi = suppressVarSemi;
iterate(nodep); iterate(nodep);
} }
virtual ~EmitVFileVisitor() override {} virtual ~EmitVFileVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -715,7 +715,7 @@ public:
, m_os(os) { // Need () or GCC 4.8 false warning , m_os(os) { // Need () or GCC 4.8 false warning
iterate(nodep); iterate(nodep);
} }
virtual ~EmitVStreamVisitor() override {} virtual ~EmitVStreamVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -792,7 +792,7 @@ public:
if (user3mark) { AstUser3InUse::check(); } if (user3mark) { AstUser3InUse::check(); }
iterate(nodep); iterate(nodep);
} }
virtual ~EmitVPrefixedVisitor() override {} virtual ~EmitVPrefixedVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -250,7 +250,7 @@ public:
: m_ofp{ofp} { : m_ofp{ofp} {
iterate(nodep); iterate(nodep);
} }
virtual ~EmitXmlFileVisitor() override {} virtual ~EmitXmlFileVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -298,7 +298,7 @@ public:
} }
m_os << "</module_files>\n"; m_os << "</module_files>\n";
} }
virtual ~ModuleFilesXmlVisitor() override {} virtual ~ModuleFilesXmlVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -363,7 +363,7 @@ public:
// Operate on whole netlist // Operate on whole netlist
nodep->accept(*this); nodep->accept(*this);
} }
virtual ~HierCellsXmlVisitor() override {} virtual ~HierCellsXmlVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -879,7 +879,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit ExpandVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ExpandVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ExpandVisitor() override {} virtual ~ExpandVisitor() override = default;
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -77,7 +77,7 @@ class V3FileDependImp {
m_stat.st_ctime = 0; m_stat.st_ctime = 0;
m_stat.st_mtime = 0; m_stat.st_mtime = 0;
} }
~DependFile() {} ~DependFile() = default;
const string& filename() const { return m_filename; } const string& filename() const { return m_filename; }
bool target() const { return m_target; } bool target() const { return m_target; }
bool exists() const { return m_exists; } bool exists() const { return m_exists; }
@ -971,7 +971,7 @@ public:
passthru("vlTOPp"); passthru("vlTOPp");
passthru("vlSymsp"); passthru("vlSymsp");
} }
~VIdProtectImp() {} ~VIdProtectImp() = default;
// METHODS // METHODS
string passthru(const string& old) { string passthru(const string& old) {
if (!v3Global.opt.protectIds()) return old; if (!v3Global.opt.protectIds()) return old;

View File

@ -130,7 +130,7 @@ private:
public: public:
V3OutFormatter(const string& filename, Language lang); V3OutFormatter(const string& filename, Language lang);
virtual ~V3OutFormatter() {} virtual ~V3OutFormatter() = default;
// ACCESSORS // ACCESSORS
string filename() const { return m_filename; } string filename() const { return m_filename; }
int column() const { return m_column; } int column() const { return m_column; }
@ -198,7 +198,7 @@ public:
: V3OutFile{filename, V3OutFormatter::LA_C} { : V3OutFile{filename, V3OutFormatter::LA_C} {
resetPrivate(); resetPrivate();
} }
virtual ~V3OutCFile() override {} virtual ~V3OutCFile() override = default;
virtual void putsHeader() { puts("// Verilated -*- C++ -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- C++ -*-\n"); }
virtual void putsIntTopInclude() { putsForceIncs(); } virtual void putsIntTopInclude() { putsForceIncs(); }
virtual void putsGuard(); virtual void putsGuard();
@ -222,7 +222,7 @@ class V3OutScFile : public V3OutCFile {
public: public:
explicit V3OutScFile(const string& filename) explicit V3OutScFile(const string& filename)
: V3OutCFile{filename} {} : V3OutCFile{filename} {}
virtual ~V3OutScFile() override {} virtual ~V3OutScFile() override = default;
virtual void putsHeader() override { puts("// Verilated -*- SystemC -*-\n"); } virtual void putsHeader() override { puts("// Verilated -*- SystemC -*-\n"); }
virtual void putsIntTopInclude() override { virtual void putsIntTopInclude() override {
putsForceIncs(); putsForceIncs();
@ -235,7 +235,7 @@ class V3OutVFile : public V3OutFile {
public: public:
explicit V3OutVFile(const string& filename) explicit V3OutVFile(const string& filename)
: V3OutFile{filename, V3OutFormatter::LA_VERILOG} {} : V3OutFile{filename, V3OutFormatter::LA_VERILOG} {}
virtual ~V3OutVFile() override {} virtual ~V3OutVFile() override = default;
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); }
}; };
@ -245,7 +245,7 @@ public:
: V3OutFile{filename, V3OutFormatter::LA_XML} { : V3OutFile{filename, V3OutFormatter::LA_XML} {
blockIndent(2); blockIndent(2);
} }
virtual ~V3OutXmlFile() override {} virtual ~V3OutXmlFile() override = default;
virtual void putsHeader() { puts("<?xml version=\"1.0\" ?>\n"); } virtual void putsHeader() { puts("<?xml version=\"1.0\" ?>\n"); }
}; };
@ -253,7 +253,7 @@ class V3OutMkFile : public V3OutFile {
public: public:
explicit V3OutMkFile(const string& filename) explicit V3OutMkFile(const string& filename)
: V3OutFile{filename, V3OutFormatter::LA_MK} {} : V3OutFile{filename, V3OutFormatter::LA_MK} {}
virtual ~V3OutMkFile() override {} virtual ~V3OutMkFile() override = default;
virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); } virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); }
// No automatic indentation yet. // No automatic indentation yet.
void puts(const char* strg) { putsNoTracking(strg); } void puts(const char* strg) { putsNoTracking(strg); }

View File

@ -45,8 +45,8 @@ class FileLineSingleton {
std::deque<string> m_names; // filename text for each filenameno std::deque<string> m_names; // filename text for each filenameno
std::deque<V3LangCode> m_languages; // language for each filenameno std::deque<V3LangCode> m_languages; // language for each filenameno
// CONSTRUCTORS // CONSTRUCTORS
FileLineSingleton() {} FileLineSingleton() = default;
~FileLineSingleton() {} ~FileLineSingleton() = default;
protected: protected:
friend class FileLine; friend class FileLine;
@ -73,7 +73,7 @@ public:
static int s_id = 0; static int s_id = 0;
m_id = ++s_id; m_id = ++s_id;
} }
~VFileContent() {} ~VFileContent() = default;
// METHODS // METHODS
void pushText(const string& text); // Add arbitrary text (need not be line-by-line) void pushText(const string& text); // Add arbitrary text (need not be line-by-line)
string getLine(int lineno) const; string getLine(int lineno) const;
@ -143,7 +143,7 @@ public:
explicit FileLine(EmptySecret); explicit FileLine(EmptySecret);
FileLine* copyOrSameFileLine(); FileLine* copyOrSameFileLine();
static void deleteAllRemaining(); static void deleteAllRemaining();
~FileLine() {} ~FileLine() = default;
#ifdef VL_LEAK_CHECKS #ifdef VL_LEAK_CHECKS
static void* operator new(size_t size); static void* operator new(size_t size);
static void operator delete(void* obj, size_t size); static void operator delete(void* obj, size_t size);

View File

@ -57,7 +57,7 @@ public:
V3Graph* m_graphp; // Graph this class is visiting V3Graph* m_graphp; // Graph this class is visiting
explicit GateGraphBaseVisitor(V3Graph* graphp) explicit GateGraphBaseVisitor(V3Graph* graphp)
: m_graphp{graphp} {} : m_graphp{graphp} {}
virtual ~GateGraphBaseVisitor() {} virtual ~GateGraphBaseVisitor() = default;
virtual VNUser visit(GateLogicVertex* vertexp, VNUser vu = VNUser(0)) = 0; virtual VNUser visit(GateLogicVertex* vertexp, VNUser vu = VNUser(0)) = 0;
virtual VNUser visit(GateVarVertex* vertexp, VNUser vu = VNUser(0)) = 0; virtual VNUser visit(GateVarVertex* vertexp, VNUser vu = VNUser(0)) = 0;
VL_DEBUG_FUNC; // Declare debug() VL_DEBUG_FUNC; // Declare debug()
@ -75,7 +75,7 @@ public:
GateEitherVertex(V3Graph* graphp, AstScope* scopep) GateEitherVertex(V3Graph* graphp, AstScope* scopep)
: V3GraphVertex{graphp} : V3GraphVertex{graphp}
, m_scopep{scopep} {} , m_scopep{scopep} {}
virtual ~GateEitherVertex() override {} virtual ~GateEitherVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string dotStyle() const override { return m_consumed ? "" : "dotted"; } virtual string dotStyle() const override { return m_consumed ? "" : "dotted"; }
AstScope* scopep() const { return m_scopep; } AstScope* scopep() const { return m_scopep; }
@ -133,7 +133,7 @@ public:
GateVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) GateVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: GateEitherVertex{graphp, scopep} : GateEitherVertex{graphp, scopep}
, m_varScp{varScp} {} , m_varScp{varScp} {}
virtual ~GateVarVertex() override {} virtual ~GateVarVertex() override = default;
// ACCESSORS // ACCESSORS
AstVarScope* varScp() const { return m_varScp; } AstVarScope* varScp() const { return m_varScp; }
virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); } virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
@ -174,7 +174,7 @@ public:
, m_nodep{nodep} , m_nodep{nodep}
, m_activep{activep} , m_activep{activep}
, m_slow{slow} {} , m_slow{slow} {}
virtual ~GateLogicVertex() override {} virtual ~GateLogicVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string name() const override { virtual string name() const override {
return (cvtToHex(m_nodep) + "@" + scopep()->prettyName()); return (cvtToHex(m_nodep) + "@" + scopep()->prettyName());
@ -291,7 +291,7 @@ public:
} }
if (debug() >= 9 && !m_isSimple) nodep->dumpTree(cout, " gate!Ok: "); if (debug() >= 9 && !m_isSimple) nodep->dumpTree(cout, " gate!Ok: ");
} }
virtual ~GateOkVisitor() override {} virtual ~GateOkVisitor() override = default;
// PUBLIC METHODS // PUBLIC METHODS
bool isSimple() const { return m_isSimple; } bool isSimple() const { return m_isSimple; }
AstNode* substTree() const { return m_substTreep; } AstNode* substTree() const { return m_substTreep; }
@ -870,7 +870,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
virtual ~GateElimVisitor() override {} virtual ~GateElimVisitor() override = default;
GateElimVisitor(AstNode* nodep, AstVarScope* varscp, AstNode* replaceTreep, GateElimVisitor(AstNode* nodep, AstVarScope* varscp, AstNode* replaceTreep,
GateDedupeVarVisitor* varVisp) { GateDedupeVarVisitor* varVisp) {
UINFO(9, " elimvisitor " << nodep << endl); UINFO(9, " elimvisitor " << nodep << endl);
@ -939,7 +939,7 @@ private:
} }
public: public:
GateDedupeHash() {} GateDedupeHash() = default;
virtual ~GateDedupeHash() override { virtual ~GateDedupeHash() override {
if (v3Global.opt.debugCheck()) check(); if (v3Global.opt.debugCheck()) check();
} }
@ -1086,8 +1086,8 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
GateDedupeVarVisitor() {} GateDedupeVarVisitor() = default;
virtual ~GateDedupeVarVisitor() override {} virtual ~GateDedupeVarVisitor() override = default;
// PUBLIC METHODS // PUBLIC METHODS
AstNodeVarRef* findDupe(AstNode* nodep, AstVarScope* consumerVarScopep, AstActive* activep) { AstNodeVarRef* findDupe(AstNode* nodep, AstVarScope* consumerVarScopep, AstActive* activep) {
m_assignp = nullptr; m_assignp = nullptr;
@ -1409,8 +1409,8 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
GateConcatVisitor() {} GateConcatVisitor() = default;
virtual ~GateConcatVisitor() override {} virtual ~GateConcatVisitor() override = default;
// PUBLIC METHODS // PUBLIC METHODS
bool concatOffset(AstConcat* concatp, AstVarScope* vscp, int& offsetr) { bool concatOffset(AstConcat* concatp, AstVarScope* vscp, int& offsetr) {
m_vscp = vscp; m_vscp = vscp;
@ -1436,7 +1436,7 @@ public:
GateClkDecompState(int offset, AstVarScope* vsp) GateClkDecompState(int offset, AstVarScope* vsp)
: m_offset{offset} : m_offset{offset}
, m_last_vsp{vsp} {} , m_last_vsp{vsp} {}
virtual ~GateClkDecompState() {} virtual ~GateClkDecompState() = default;
}; };
class GateClkDecompGraphVisitor : public GateGraphBaseVisitor { class GateClkDecompGraphVisitor : public GateGraphBaseVisitor {
@ -1591,7 +1591,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit GateDeassignVisitor(AstNode* nodep) { iterate(nodep); } explicit GateDeassignVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~GateDeassignVisitor() override {} virtual ~GateDeassignVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -121,7 +121,7 @@ public:
: m_topModp{topModp} { : m_topModp{topModp} {
iterate(nodep); iterate(nodep);
} }
virtual ~GenClkRenameVisitor() override {} virtual ~GenClkRenameVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -214,7 +214,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit GenClkReadVisitor(AstNetlist* nodep) { iterate(nodep); } explicit GenClkReadVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~GenClkReadVisitor() override {} virtual ~GenClkReadVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -218,7 +218,7 @@ public:
virtual V3GraphVertex* clone(V3Graph* graphp) const { virtual V3GraphVertex* clone(V3Graph* graphp) const {
return new V3GraphVertex(graphp, *this); return new V3GraphVertex(graphp, *this);
} }
virtual ~V3GraphVertex() {} virtual ~V3GraphVertex() = default;
void unlinkEdges(V3Graph* graphp); void unlinkEdges(V3Graph* graphp);
void unlinkDelete(V3Graph* graphp); void unlinkDelete(V3Graph* graphp);
@ -317,7 +317,7 @@ public:
virtual V3GraphEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const { virtual V3GraphEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const {
return new V3GraphEdge(graphp, fromp, top, *this); return new V3GraphEdge(graphp, fromp, top, *this);
} }
virtual ~V3GraphEdge() {} virtual ~V3GraphEdge() = default;
// METHODS // METHODS
virtual string name() const { return m_fromp->name() + "->" + m_top->name(); } virtual string name() const { return m_fromp->name() + "->" + m_top->name(); }
virtual string dotLabel() const { return ""; } virtual string dotLabel() const { return ""; }

View File

@ -42,7 +42,7 @@ public:
GraphAcycVertex(V3Graph* graphp, V3GraphVertex* origVertexp) GraphAcycVertex(V3Graph* graphp, V3GraphVertex* origVertexp)
: V3GraphVertex{graphp} : V3GraphVertex{graphp}
, m_origVertexp{origVertexp} {} , m_origVertexp{origVertexp} {}
virtual ~GraphAcycVertex() override {} virtual ~GraphAcycVertex() override = default;
V3GraphVertex* origVertexp() const { return m_origVertexp; } V3GraphVertex* origVertexp() const { return m_origVertexp; }
void setDelete() { m_deleted = true; } void setDelete() { m_deleted = true; }
bool isDelete() const { return m_deleted; } bool isDelete() const { return m_deleted; }
@ -67,7 +67,7 @@ public:
GraphAcycEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight, GraphAcycEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
bool cutable = false) bool cutable = false)
: V3GraphEdge{graphp, fromp, top, weight, cutable} {} : V3GraphEdge{graphp, fromp, top, weight, cutable} {}
virtual ~GraphAcycEdge() override {} virtual ~GraphAcycEdge() override = default;
// yellow=we might still cut it, else oldEdge: yellowGreen=made uncutable, red=uncutable // yellow=we might still cut it, else oldEdge: yellowGreen=made uncutable, red=uncutable
virtual string dotColor() const override { virtual string dotColor() const override {
return (cutable() ? "yellow" : origEdgep()->dotColor()); return (cutable() ? "yellow" : origEdgep()->dotColor());

View File

@ -123,7 +123,7 @@ public:
, m_sumWeights{sumWeights} { , m_sumWeights{sumWeights} {
main(); main();
} }
~GraphRemoveRedundant() {} ~GraphRemoveRedundant() = default;
}; };
void V3Graph::removeRedundantEdges(V3EdgeFuncP edgeFuncp) { void V3Graph::removeRedundantEdges(V3EdgeFuncP edgeFuncp) {
@ -200,7 +200,7 @@ public:
: GraphAlg<>(graphp, edgeFuncp) { : GraphAlg<>(graphp, edgeFuncp) {
main(); main();
} }
~GraphAlgWeakly() {} ~GraphAlgWeakly() = default;
}; };
void V3Graph::weaklyConnected(V3EdgeFuncP edgeFuncp) { GraphAlgWeakly(this, edgeFuncp); } void V3Graph::weaklyConnected(V3EdgeFuncP edgeFuncp) { GraphAlgWeakly(this, edgeFuncp); }
@ -288,7 +288,7 @@ public:
m_currentDfs = 0; m_currentDfs = 0;
main(); main();
} }
~GraphAlgStrongly() {} ~GraphAlgStrongly() = default;
}; };
void V3Graph::stronglyConnected(V3EdgeFuncP edgeFuncp) { GraphAlgStrongly(this, edgeFuncp); } void V3Graph::stronglyConnected(V3EdgeFuncP edgeFuncp) { GraphAlgStrongly(this, edgeFuncp); }
@ -339,7 +339,7 @@ public:
: GraphAlg<>{graphp, edgeFuncp} { : GraphAlg<>{graphp, edgeFuncp} {
main(); main();
} }
~GraphAlgRank() {} ~GraphAlgRank() = default;
}; };
void V3Graph::rank() { GraphAlgRank(this, &V3GraphEdge::followAlwaysTrue); } void V3Graph::rank() { GraphAlgRank(this, &V3GraphEdge::followAlwaysTrue); }
@ -393,7 +393,7 @@ public:
m_done = false; m_done = false;
main(vertexp); main(vertexp);
} }
~GraphAlgRLoops() {} ~GraphAlgRLoops() = default;
}; };
void V3Graph::reportLoops(V3EdgeFuncP edgeFuncp, V3GraphVertex* vertexp) { void V3Graph::reportLoops(V3EdgeFuncP edgeFuncp, V3GraphVertex* vertexp) {
@ -441,7 +441,7 @@ public:
m_graphp->userClearEdges(); m_graphp->userClearEdges();
(void)vertexIterateAll(vertexp); (void)vertexIterateAll(vertexp);
} }
~GraphAlgSubtrees() {} ~GraphAlgSubtrees() = default;
}; };
//! Report the entire connected graph with a loop or loops //! Report the entire connected graph with a loop or loops

View File

@ -36,7 +36,7 @@ protected:
GraphAlg(T_Graph* graphp, V3EdgeFuncP edgeFuncp) GraphAlg(T_Graph* graphp, V3EdgeFuncP edgeFuncp)
: m_graphp{graphp} : m_graphp{graphp}
, m_edgeFuncp{edgeFuncp} {} , m_edgeFuncp{edgeFuncp} {}
~GraphAlg() {} ~GraphAlg() = default;
// METHODS // METHODS
inline bool followEdge(V3GraphEdge* edgep) { inline bool followEdge(V3GraphEdge* edgep) {
return (edgep->weight() && (m_edgeFuncp)(edgep)); return (edgep->weight() && (m_edgeFuncp)(edgep));

View File

@ -368,7 +368,7 @@ public:
m_step = 0; m_step = 0;
main(); main();
} }
~GraphNfaToDfa() {} ~GraphNfaToDfa() = default;
}; };
void DfaGraph::nfaToDfa() { GraphNfaToDfa(this, &V3GraphEdge::followAlwaysTrue); } void DfaGraph::nfaToDfa() { GraphNfaToDfa(this, &V3GraphEdge::followAlwaysTrue); }
@ -502,7 +502,7 @@ public:
optimize_no_outbound(); optimize_no_outbound();
if (debug() >= 6) m_graphp->dumpDotFilePrefixed("opt_noout"); if (debug() >= 6) m_graphp->dumpDotFilePrefixed("opt_noout");
} }
~DfaGraphReduce() {} ~DfaGraphReduce() = default;
}; };
void DfaGraph::dfaReduce() { DfaGraphReduce(this, &V3GraphEdge::followAlwaysTrue); } void DfaGraph::dfaReduce() { DfaGraphReduce(this, &V3GraphEdge::followAlwaysTrue); }
@ -598,7 +598,7 @@ public:
VL_DO_CLEAR(m_tempNewerReject->unlinkDelete(graphp()), m_tempNewerReject = nullptr); VL_DO_CLEAR(m_tempNewerReject->unlinkDelete(graphp()), m_tempNewerReject = nullptr);
if (debug() >= 6) m_graphp->dumpDotFilePrefixed("comp_out"); if (debug() >= 6) m_graphp->dumpDotFilePrefixed("comp_out");
} }
~DfaGraphComplement() {} ~DfaGraphComplement() = default;
VL_UNCOPYABLE(DfaGraphComplement); VL_UNCOPYABLE(DfaGraphComplement);
}; };

View File

@ -61,8 +61,8 @@ class DfaEdge;
class DfaGraph : public V3Graph { class DfaGraph : public V3Graph {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
DfaGraph() {} DfaGraph() = default;
virtual ~DfaGraph() override {} virtual ~DfaGraph() override = default;
// METHODS // METHODS
/// Find start node /// Find start node
DfaVertex* findStart(); DfaVertex* findStart();
@ -93,7 +93,7 @@ public:
virtual DfaVertex* clone(DfaGraph* graphp) { virtual DfaVertex* clone(DfaGraph* graphp) {
return new DfaVertex(graphp, start(), accepting()); return new DfaVertex(graphp, start(), accepting());
} }
virtual ~DfaVertex() override {} virtual ~DfaVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string dotShape() const override { return (accepting() ? "doublecircle" : ""); } virtual string dotShape() const override { return (accepting() ? "doublecircle" : ""); }
virtual string dotColor() const override { virtual string dotColor() const override {
@ -128,7 +128,7 @@ public:
: V3GraphEdge{graphp, fromp, top, copyfrom->weight()} : V3GraphEdge{graphp, fromp, top, copyfrom->weight()}
, m_input{copyfrom->input()} , m_input{copyfrom->input()}
, m_complement{copyfrom->complement()} {} , m_complement{copyfrom->complement()} {}
virtual ~DfaEdge() override {} virtual ~DfaEdge() override = default;
// METHODS // METHODS
virtual string dotColor() const override { virtual string dotColor() const override {
return (na() ? "yellow" : epsilon() ? "green" : "black"); return (na() ? "yellow" : epsilon() ? "green" : "black");

View File

@ -44,7 +44,7 @@ struct GraphPCNode {
GraphPCNode() { GraphPCNode() {
for (unsigned int& w : m_cp) w = 0; for (unsigned int& w : m_cp) w = 0;
} }
~GraphPCNode() {} ~GraphPCNode() = default;
}; };
//###################################################################### //######################################################################

View File

@ -132,7 +132,7 @@ public:
} }
} }
} }
~GraphStream() {} ~GraphStream() = default;
// METHODS // METHODS

View File

@ -40,8 +40,8 @@ protected:
} }
public: public:
V3GraphTest() {} V3GraphTest() = default;
virtual ~V3GraphTest() {} virtual ~V3GraphTest() = default;
VL_DEBUG_FUNC; // Declare debug() VL_DEBUG_FUNC; // Declare debug()
void run() { runTest(); } void run() { runTest(); }
}; };
@ -57,7 +57,7 @@ public:
V3GraphTestVertex(V3Graph* graphp, const string& name) V3GraphTestVertex(V3Graph* graphp, const string& name)
: V3GraphVertex{graphp} : V3GraphVertex{graphp}
, m_name{name} {} , m_name{name} {}
virtual ~V3GraphTestVertex() override {} virtual ~V3GraphTestVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string name() const override { return m_name; } virtual string name() const override { return m_name; }
}; };
@ -66,7 +66,7 @@ class V3GraphTestVarVertex : public V3GraphTestVertex {
public: public:
V3GraphTestVarVertex(V3Graph* graphp, const string& name) V3GraphTestVarVertex(V3Graph* graphp, const string& name)
: V3GraphTestVertex{graphp, name} {} : V3GraphTestVertex{graphp, name} {}
virtual ~V3GraphTestVarVertex() override {} virtual ~V3GraphTestVarVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string dotColor() const override { return "blue"; } virtual string dotColor() const override { return "blue"; }
}; };
@ -267,7 +267,7 @@ public:
DfaTestVertex(DfaGraph* graphp, const string& name) DfaTestVertex(DfaGraph* graphp, const string& name)
: DfaVertex{graphp} : DfaVertex{graphp}
, m_name{name} {} , m_name{name} {}
virtual ~DfaTestVertex() override {} virtual ~DfaTestVertex() override = default;
// ACCESSORS // ACCESSORS
virtual string name() const override { return m_name; } virtual string name() const override { return m_name; }
}; };

View File

@ -102,7 +102,7 @@ public:
nodeHashIterate(const_cast<AstNode*>(nodep)); nodeHashIterate(const_cast<AstNode*>(nodep));
} }
V3Hash finalHash() const { return m_lowerHash; } V3Hash finalHash() const { return m_lowerHash; }
virtual ~HashedVisitor() override {} virtual ~HashedVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -27,8 +27,8 @@
class VHashedBase { class VHashedBase {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
VHashedBase() {} VHashedBase() = default;
~VHashedBase() {} ~VHashedBase() = default;
// METHODS // METHODS
VL_DEBUG_FUNC; // Declare debug() VL_DEBUG_FUNC; // Declare debug()
@ -39,8 +39,8 @@ public:
struct V3HashedUserSame { struct V3HashedUserSame {
// Functor for V3Hashed::findDuplicate // Functor for V3Hashed::findDuplicate
virtual bool isSame(AstNode*, AstNode*) = 0; virtual bool isSame(AstNode*, AstNode*) = 0;
V3HashedUserSame() {} V3HashedUserSame() = default;
virtual ~V3HashedUserSame() {} virtual ~V3HashedUserSame() = default;
}; };
class V3Hashed : public VHashedBase { class V3Hashed : public VHashedBase {
@ -60,7 +60,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
V3Hashed() { clear(); } V3Hashed() { clear(); }
~V3Hashed() {} ~V3Hashed() = default;
// ACCESSORS // ACCESSORS
HashMmap& mmap() { return m_hashMmap; } // Return map for iteration HashMmap& mmap() { return m_hashMmap; } // Return map for iteration

View File

@ -304,8 +304,6 @@ public:
//###################################################################### //######################################################################
V3HierBlockPlan::V3HierBlockPlan() {}
bool V3HierBlockPlan::isHierBlock(const AstNodeModule* modp) const { bool V3HierBlockPlan::isHierBlock(const AstNodeModule* modp) const {
return m_blocks.find(modp) != m_blocks.end(); return m_blocks.find(modp) != m_blocks.end();
} }

View File

@ -99,7 +99,7 @@ class V3HierBlockPlan {
typedef std::map<const AstNodeModule*, V3HierBlock*> HierMap; typedef std::map<const AstNodeModule*, V3HierBlock*> HierMap;
HierMap m_blocks; HierMap m_blocks;
V3HierBlockPlan(); V3HierBlockPlan() = default;
VL_UNCOPYABLE(V3HierBlockPlan); VL_UNCOPYABLE(V3HierBlockPlan);
public: public:

View File

@ -254,7 +254,7 @@ public:
explicit InlineCollectVisitor(AstNodeModule* nodep) { // passed OLD module, not new one explicit InlineCollectVisitor(AstNodeModule* nodep) { // passed OLD module, not new one
iterate(nodep); iterate(nodep);
} }
virtual ~InlineCollectVisitor() override {} virtual ~InlineCollectVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -474,7 +474,7 @@ public:
, m_cellp{cellp} { , m_cellp{cellp} {
iterate(cloneModp); iterate(cloneModp);
} }
virtual ~InlineRelinkVisitor() override {} virtual ~InlineRelinkVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -702,7 +702,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit InlineIntfRefVisitor(AstNode* nodep) { iterate(nodep); } explicit InlineIntfRefVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~InlineIntfRefVisitor() override {} virtual ~InlineIntfRefVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -132,7 +132,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit InstVisitor(AstNetlist* nodep) { iterate(nodep); } explicit InstVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~InstVisitor() override {} virtual ~InstVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -178,13 +178,13 @@ public:
} }
// CONSTRUCTORS // CONSTRUCTORS
explicit InstDeModVarVisitor() {} InstDeModVarVisitor() = default;
virtual ~InstDeModVarVisitor() override = default;
void main(AstNodeModule* nodep) { void main(AstNodeModule* nodep) {
UINFO(8, " dmMODULE " << nodep << endl); UINFO(8, " dmMODULE " << nodep << endl);
m_modVarNameMap.clear(); m_modVarNameMap.clear();
iterate(nodep); iterate(nodep);
} }
virtual ~InstDeModVarVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -466,7 +466,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit InstDeVisitor(AstNetlist* nodep) { iterate(nodep); } explicit InstDeVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~InstDeVisitor() override {} virtual ~InstDeVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -475,7 +475,7 @@ public:
class InstStatic { class InstStatic {
private: private:
VL_DEBUG_FUNC; // Declare debug() VL_DEBUG_FUNC; // Declare debug()
InstStatic() {} // Static class InstStatic() = default; // Static class
static AstNode* extendOrSel(FileLine* fl, AstNode* rhsp, AstNode* cmpWidthp) { static AstNode* extendOrSel(FileLine* fl, AstNode* rhsp, AstNode* cmpWidthp) {
if (cmpWidthp->width() > rhsp->width()) { if (cmpWidthp->width() > rhsp->width()) {

View File

@ -74,7 +74,7 @@ public:
, m_osp{osp} { , m_osp{osp} {
if (nodep) iterate(nodep); if (nodep) iterate(nodep);
} }
virtual ~InstrCountVisitor() override {} virtual ~InstrCountVisitor() override = default;
// METHODS // METHODS
uint32_t instrCount() const { return m_instrCount; } uint32_t instrCount() const { return m_instrCount; }
@ -275,7 +275,7 @@ public:
UASSERT_OBJ(osp, nodep, "Don't call if not dumping"); UASSERT_OBJ(osp, nodep, "Don't call if not dumping");
if (nodep) iterate(nodep); if (nodep) iterate(nodep);
} }
virtual ~InstrCountDumpVisitor() override {} virtual ~InstrCountDumpVisitor() override = default;
private: private:
// METHODS // METHODS

View File

@ -50,7 +50,7 @@ public:
std::vector<AstNode*> m_unlinkps; std::vector<AstNode*> m_unlinkps;
// CONSTRUCTORS // CONSTRUCTORS
LifeState() {} LifeState() = default;
~LifeState() { ~LifeState() {
V3Stats::addStatSum("Optimizations, Lifetime assign deletions", m_statAssnDel); V3Stats::addStatSum("Optimizations, Lifetime assign deletions", m_statAssnDel);
V3Stats::addStatSum("Optimizations, Lifetime constant prop", m_statAssnCon); V3Stats::addStatSum("Optimizations, Lifetime constant prop", m_statAssnCon);
@ -92,7 +92,7 @@ public:
: m_setBeforeUse{false} { : m_setBeforeUse{false} {
consumed(); consumed();
} }
~LifeVarEntry() {} ~LifeVarEntry() = default;
inline void simpleAssign(AstNodeAssign* assp) { // New simple A=.... assignment inline void simpleAssign(AstNodeAssign* assp) { // New simple A=.... assignment
m_assignp = assp; m_assignp = assp;
m_constp = nullptr; m_constp = nullptr;
@ -135,7 +135,7 @@ public:
m_aboveLifep = aboveLifep; // Null if top m_aboveLifep = aboveLifep; // Null if top
m_statep = statep; m_statep = statep;
} }
~LifeBlock() {} ~LifeBlock() = default;
// METHODS // METHODS
void checkRemoveAssign(const LifeMap::iterator& it) { void checkRemoveAssign(const LifeMap::iterator& it) {
AstVar* varp = it->first->varp(); AstVar* varp = it->first->varp();
@ -479,7 +479,7 @@ public:
: m_statep{statep} { : m_statep{statep} {
iterate(nodep); iterate(nodep);
} }
virtual ~LifeTopVisitor() override {} virtual ~LifeTopVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -91,7 +91,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LifePostElimVisitor(AstTopScope* nodep) { iterate(nodep); } explicit LifePostElimVisitor(AstTopScope* nodep) { iterate(nodep); }
virtual ~LifePostElimVisitor() override {} virtual ~LifePostElimVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -103,7 +103,7 @@ struct LifeLocation {
uint32_t sequence = 0; uint32_t sequence = 0;
public: public:
LifeLocation() {} LifeLocation() = default;
LifeLocation(const ExecMTask* mtaskp_, uint32_t sequence_) LifeLocation(const ExecMTask* mtaskp_, uint32_t sequence_)
: mtaskp{mtaskp_} : mtaskp{mtaskp_}
, sequence{sequence_} {} , sequence{sequence_} {}
@ -119,7 +119,7 @@ public:
struct LifePostLocation { struct LifePostLocation {
LifeLocation loc; LifeLocation loc;
AstAssignPost* nodep = nullptr; AstAssignPost* nodep = nullptr;
LifePostLocation() {} LifePostLocation() = default;
LifePostLocation(LifeLocation loc_, AstAssignPost* nodep_) LifePostLocation(LifeLocation loc_, AstAssignPost* nodep_)
: loc{loc_} : loc{loc_}
, nodep{nodep_} {} , nodep{nodep_} {}

View File

@ -43,8 +43,8 @@
class LinkCellsGraph : public V3Graph { class LinkCellsGraph : public V3Graph {
public: public:
LinkCellsGraph() {} LinkCellsGraph() = default;
virtual ~LinkCellsGraph() override {} virtual ~LinkCellsGraph() override = default;
virtual void loopsMessageCb(V3GraphVertex* vertexp) override; virtual void loopsMessageCb(V3GraphVertex* vertexp) override;
}; };
@ -55,7 +55,7 @@ public:
LinkCellsVertex(V3Graph* graphp, AstNodeModule* modp) LinkCellsVertex(V3Graph* graphp, AstNodeModule* modp)
: V3GraphVertex{graphp} : V3GraphVertex{graphp}
, m_modp{modp} {} , m_modp{modp} {}
virtual ~LinkCellsVertex() override {} virtual ~LinkCellsVertex() override = default;
AstNodeModule* modp() const { return m_modp; } AstNodeModule* modp() const { return m_modp; }
virtual string name() const override { return modp()->name(); } virtual string name() const override { return modp()->name(); }
virtual FileLine* fileline() const override { return modp()->fileline(); } virtual FileLine* fileline() const override { return modp()->fileline(); }
@ -69,7 +69,7 @@ class LibraryVertex : public V3GraphVertex {
public: public:
explicit LibraryVertex(V3Graph* graphp) explicit LibraryVertex(V3Graph* graphp)
: V3GraphVertex{graphp} {} : V3GraphVertex{graphp} {}
virtual ~LibraryVertex() override {} virtual ~LibraryVertex() override = default;
virtual string name() const override { return "*LIBRARY*"; } virtual string name() const override { return "*LIBRARY*"; }
}; };
@ -517,7 +517,7 @@ public:
} }
iterate(nodep); iterate(nodep);
} }
virtual ~LinkCellsVisitor() override {} virtual ~LinkCellsVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -1314,7 +1314,7 @@ public:
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotFindVisitor() override {} virtual ~LinkDotFindVisitor() override = default;
}; };
//====================================================================== //======================================================================
@ -1479,7 +1479,7 @@ public:
UINFO(4, __FUNCTION__ << ": " << endl); UINFO(4, __FUNCTION__ << ": " << endl);
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotParamVisitor() override {} virtual ~LinkDotParamVisitor() override = default;
}; };
//====================================================================== //======================================================================
@ -1637,7 +1637,7 @@ public:
UINFO(4, __FUNCTION__ << ": " << endl); UINFO(4, __FUNCTION__ << ": " << endl);
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotScopeVisitor() override {} virtual ~LinkDotScopeVisitor() override = default;
}; };
//====================================================================== //======================================================================
@ -1722,7 +1722,7 @@ public:
m_statep = statep; m_statep = statep;
iterate(nodep); iterate(nodep);
} }
virtual ~LinkDotIfaceVisitor() override {} virtual ~LinkDotIfaceVisitor() override = default;
}; };
void LinkDotState::computeIfaceModSyms() { void LinkDotState::computeIfaceModSyms() {
@ -1777,7 +1777,7 @@ private:
bool m_dotErr; // Error found in dotted resolution, ignore upwards bool m_dotErr; // Error found in dotted resolution, ignore upwards
string m_dotText; // String of dotted names found in below parseref string m_dotText; // String of dotted names found in below parseref
DotStates() { init(nullptr); } DotStates() { init(nullptr); }
~DotStates() {} ~DotStates() = default;
void init(VSymEnt* curSymp) { void init(VSymEnt* curSymp) {
m_dotPos = DP_NONE; m_dotPos = DP_NONE;
m_dotSymp = curSymp; m_dotSymp = curSymp;
@ -2919,7 +2919,7 @@ public:
UINFO(4, __FUNCTION__ << ": " << endl); UINFO(4, __FUNCTION__ << ": " << endl);
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotResolveVisitor() override {} virtual ~LinkDotResolveVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -238,7 +238,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LinkIncVisitor(AstNetlist* nodep) { iterate(nodep); } explicit LinkIncVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~LinkIncVisitor() override {} virtual ~LinkIncVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -282,7 +282,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LinkJumpVisitor(AstNetlist* nodep) { iterate(nodep); } explicit LinkJumpVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~LinkJumpVisitor() override {} virtual ~LinkJumpVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -290,7 +290,7 @@ public:
: m_setRefLvalue{start} { : m_setRefLvalue{start} {
iterate(nodep); iterate(nodep);
} }
virtual ~LinkLValueVisitor() override {} virtual ~LinkLValueVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -606,7 +606,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LinkParseVisitor(AstNetlist* rootp) { iterate(rootp); } explicit LinkParseVisitor(AstNetlist* rootp) { iterate(rootp); }
virtual ~LinkParseVisitor() override {} virtual ~LinkParseVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -517,7 +517,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LinkResolveVisitor(AstNetlist* rootp) { iterate(rootp); } explicit LinkResolveVisitor(AstNetlist* rootp) { iterate(rootp); }
virtual ~LinkResolveVisitor() override {} virtual ~LinkResolveVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -556,7 +556,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LinkBotupVisitor(AstNetlist* rootp) { iterate(rootp); } explicit LinkBotupVisitor(AstNetlist* rootp) { iterate(rootp); }
virtual ~LinkBotupVisitor() override {} virtual ~LinkBotupVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -36,8 +36,8 @@ private:
friend class V3ListEnt<T>; friend class V3ListEnt<T>;
public: public:
V3List() {} V3List() = default;
~V3List() {} ~V3List() = default;
// METHODS // METHODS
T begin() const { return m_headp; } T begin() const { return m_headp; }
T end() const { return nullptr; } T end() const { return nullptr; }
@ -65,7 +65,7 @@ private:
} }
public: public:
V3ListEnt() {} V3ListEnt() = default;
~V3ListEnt() { ~V3ListEnt() {
#ifdef VL_DEBUG #ifdef VL_DEBUG
// Load bogus pointers so we can catch deletion bugs // Load bogus pointers so we can catch deletion bugs

View File

@ -85,7 +85,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LocalizeDehierVisitor(AstNetlist* nodep) { iterate(nodep); } explicit LocalizeDehierVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~LocalizeDehierVisitor() override {} virtual ~LocalizeDehierVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -86,7 +86,7 @@ private:
} }
public: public:
CheckMergeableVisitor() {} CheckMergeableVisitor() = default;
// Return false if this node should not be merged at all because: // Return false if this node should not be merged at all because:
// - It contains an impure expression // - It contains an impure expression

View File

@ -136,7 +136,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit NameVisitor(AstNetlist* nodep) { iterate(nodep); } explicit NameVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~NameVisitor() override {} virtual ~NameVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -99,8 +99,8 @@ public:
m_libExtVs.push_back(libext); m_libExtVs.push_back(libext);
} }
} }
V3OptionsImp() {} V3OptionsImp() = default;
~V3OptionsImp() {} ~V3OptionsImp() = default;
}; };
//###################################################################### //######################################################################

View File

@ -219,7 +219,7 @@ public:
OrderUser() { OrderUser() {
for (auto& vertexp : m_vertexp) vertexp = nullptr; for (auto& vertexp : m_vertexp) vertexp = nullptr;
} }
~OrderUser() {} ~OrderUser() = default;
}; };
//###################################################################### //######################################################################
@ -366,7 +366,7 @@ public:
iterate(nodep); iterate(nodep);
} while (m_newClkMarked); } while (m_newClkMarked);
} }
virtual ~OrderClkMarkVisitor() override {} virtual ~OrderClkMarkVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -397,7 +397,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit OrderClkAssVisitor(AstNode* nodep) { iterate(nodep); } explicit OrderClkAssVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~OrderClkAssVisitor() override {} virtual ~OrderClkAssVisitor() override = default;
// METHODS // METHODS
bool isClkAss() const { return m_clkAss; } bool isClkAss() const { return m_clkAss; }
}; };
@ -457,7 +457,7 @@ public:
: m_graphp{logicGraphp} : m_graphp{logicGraphp}
, m_outGraphp{outGraphp} , m_outGraphp{outGraphp}
, m_vxMakerp{vxMakerp} {} , m_vxMakerp{vxMakerp} {}
virtual ~ProcessMoveBuildGraph() {} virtual ~ProcessMoveBuildGraph() = default;
// METHODS // METHODS
void build() { void build() {
@ -621,8 +621,8 @@ public:
class MTaskVxIdLessThan { class MTaskVxIdLessThan {
public: public:
MTaskVxIdLessThan() {} MTaskVxIdLessThan() = default;
virtual ~MTaskVxIdLessThan() {} virtual ~MTaskVxIdLessThan() = default;
// Sort vertex's, which must be AbstractMTask's, into a deterministic // Sort vertex's, which must be AbstractMTask's, into a deterministic
// order by comparing their serial IDs. // order by comparing their serial IDs.
@ -755,7 +755,7 @@ private:
AstMTaskBody* m_mtaskBodyp = nullptr; AstMTaskBody* m_mtaskBodyp = nullptr;
Logics m_logics; Logics m_logics;
ExecMTask* m_execMTaskp = nullptr; ExecMTask* m_execMTaskp = nullptr;
MTaskState() {} MTaskState() = default;
}; };
void processMTasks(); void processMTasks();
typedef enum : uint8_t { LOGIC_INITIAL, LOGIC_SETTLE } InitialLogicE; typedef enum : uint8_t { LOGIC_INITIAL, LOGIC_SETTLE } InitialLogicE;

View File

@ -112,8 +112,8 @@ inline bool operator==(OrderVEdgeType::en lhs, const OrderVEdgeType& rhs) {
class OrderGraph : public V3Graph { class OrderGraph : public V3Graph {
public: public:
OrderGraph() {} OrderGraph() = default;
virtual ~OrderGraph() override {} virtual ~OrderGraph() override = default;
// Methods // Methods
virtual void loopsVertexCb(V3GraphVertex* vertexp) override; virtual void loopsVertexCb(V3GraphVertex* vertexp) override;
}; };
@ -137,7 +137,7 @@ public:
: V3GraphVertex{graphp} : V3GraphVertex{graphp}
, m_scopep{scopep} , m_scopep{scopep}
, m_domainp{domainp} {} , m_domainp{domainp} {}
virtual ~OrderEitherVertex() override {} virtual ~OrderEitherVertex() override = default;
virtual OrderEitherVertex* clone(V3Graph* graphp) const override = 0; virtual OrderEitherVertex* clone(V3Graph* graphp) const override = 0;
// Methods // Methods
virtual OrderVEdgeType type() const = 0; virtual OrderVEdgeType type() const = 0;
@ -160,7 +160,7 @@ public:
: OrderEitherVertex{graphp, nullptr, domainp} { : OrderEitherVertex{graphp, nullptr, domainp} {
isFromInput(true); // By definition isFromInput(true); // By definition
} }
virtual ~OrderInputsVertex() override {} virtual ~OrderInputsVertex() override = default;
virtual OrderInputsVertex* clone(V3Graph* graphp) const override { virtual OrderInputsVertex* clone(V3Graph* graphp) const override {
return new OrderInputsVertex(graphp, *this); return new OrderInputsVertex(graphp, *this);
} }
@ -183,7 +183,7 @@ public:
OrderLogicVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp, AstNode* nodep) OrderLogicVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp, AstNode* nodep)
: OrderEitherVertex{graphp, scopep, domainp} : OrderEitherVertex{graphp, scopep, domainp}
, m_nodep{nodep} {} , m_nodep{nodep} {}
virtual ~OrderLogicVertex() override {} virtual ~OrderLogicVertex() override = default;
virtual OrderLogicVertex* clone(V3Graph* graphp) const override { virtual OrderLogicVertex* clone(V3Graph* graphp) const override {
return new OrderLogicVertex(graphp, *this); return new OrderLogicVertex(graphp, *this);
} }
@ -212,7 +212,7 @@ public:
OrderVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderEitherVertex{graphp, scopep, nullptr} : OrderEitherVertex{graphp, scopep, nullptr}
, m_varScp{varScp} {} , m_varScp{varScp} {}
virtual ~OrderVarVertex() override {} virtual ~OrderVarVertex() override = default;
virtual OrderVarVertex* clone(V3Graph* graphp) const override = 0; virtual OrderVarVertex* clone(V3Graph* graphp) const override = 0;
virtual OrderVEdgeType type() const override = 0; virtual OrderVEdgeType type() const override = 0;
virtual FileLine* fileline() const override { return varScp()->fileline(); } virtual FileLine* fileline() const override { return varScp()->fileline(); }
@ -231,7 +231,7 @@ class OrderVarStdVertex : public OrderVarVertex {
public: public:
OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex{graphp, scopep, varScp} {} : OrderVarVertex{graphp, scopep, varScp} {}
virtual ~OrderVarStdVertex() override {} virtual ~OrderVarStdVertex() override = default;
virtual OrderVarStdVertex* clone(V3Graph* graphp) const override { virtual OrderVarStdVertex* clone(V3Graph* graphp) const override {
return new OrderVarStdVertex(graphp, *this); return new OrderVarStdVertex(graphp, *this);
} }
@ -249,7 +249,7 @@ class OrderVarPreVertex : public OrderVarVertex {
public: public:
OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex{graphp, scopep, varScp} {} : OrderVarVertex{graphp, scopep, varScp} {}
virtual ~OrderVarPreVertex() override {} virtual ~OrderVarPreVertex() override = default;
virtual OrderVarPreVertex* clone(V3Graph* graphp) const override { virtual OrderVarPreVertex* clone(V3Graph* graphp) const override {
return new OrderVarPreVertex(graphp, *this); return new OrderVarPreVertex(graphp, *this);
} }
@ -271,7 +271,7 @@ public:
return new OrderVarPostVertex(graphp, *this); return new OrderVarPostVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPOST; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPOST; }
virtual ~OrderVarPostVertex() override {} virtual ~OrderVarPostVertex() override = default;
virtual string name() const override { virtual string name() const override {
return (cvtToHex(varScp()) + " POST\\n " + varScp()->name()); return (cvtToHex(varScp()) + " POST\\n " + varScp()->name());
} }
@ -285,7 +285,7 @@ class OrderVarPordVertex : public OrderVarVertex {
public: public:
OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex{graphp, scopep, varScp} {} : OrderVarVertex{graphp, scopep, varScp} {}
virtual ~OrderVarPordVertex() override {} virtual ~OrderVarPordVertex() override = default;
virtual OrderVarPordVertex* clone(V3Graph* graphp) const override { virtual OrderVarPordVertex* clone(V3Graph* graphp) const override {
return new OrderVarPordVertex(graphp, *this); return new OrderVarPordVertex(graphp, *this);
} }
@ -303,7 +303,7 @@ class OrderVarSettleVertex : public OrderVarVertex {
public: public:
OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex{graphp, scopep, varScp} {} : OrderVarVertex{graphp, scopep, varScp} {}
virtual ~OrderVarSettleVertex() override {} virtual ~OrderVarSettleVertex() override = default;
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const override { virtual OrderVarSettleVertex* clone(V3Graph* graphp) const override {
return new OrderVarSettleVertex(graphp, *this); return new OrderVarSettleVertex(graphp, *this);
} }
@ -339,7 +339,7 @@ public:
, m_logicp{logicp} , m_logicp{logicp}
, m_state{POM_WAIT} , m_state{POM_WAIT}
, m_domScopep{nullptr} {} , m_domScopep{nullptr} {}
virtual ~OrderMoveVertex() override {} virtual ~OrderMoveVertex() override = default;
virtual OrderMoveVertex* clone(V3Graph* graphp) const override { virtual OrderMoveVertex* clone(V3Graph* graphp) const override {
v3fatalSrc("Unsupported"); v3fatalSrc("Unsupported");
return nullptr; return nullptr;
@ -409,7 +409,7 @@ public:
, m_domainp{domainp} { , m_domainp{domainp} {
UASSERT(!(logicp && varp), "MTaskMoveVertex: logicp and varp may not both be set!\n"); UASSERT(!(logicp && varp), "MTaskMoveVertex: logicp and varp may not both be set!\n");
} }
virtual ~MTaskMoveVertex() override {} virtual ~MTaskMoveVertex() override = default;
virtual MTaskMoveVertex* clone(V3Graph* graphp) const override { virtual MTaskMoveVertex* clone(V3Graph* graphp) const override {
v3fatalSrc("Unsupported"); v3fatalSrc("Unsupported");
return nullptr; return nullptr;
@ -454,7 +454,7 @@ public:
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight, OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
bool cutable = false) bool cutable = false)
: V3GraphEdge{graphp, fromp, top, weight, cutable} {} : V3GraphEdge{graphp, fromp, top, weight, cutable} {}
virtual ~OrderEdge() override {} virtual ~OrderEdge() override = default;
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_STD; } virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_STD; }
virtual OrderEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, virtual OrderEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const override { V3GraphVertex* top) const override {
@ -482,7 +482,7 @@ public:
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: OrderEdge{graphp, fromp, top, WEIGHT_COMBO, CUTABLE} {} : OrderEdge{graphp, fromp, top, WEIGHT_COMBO, CUTABLE} {}
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_COMBOCUT; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_COMBOCUT; }
virtual ~OrderComboCutEdge() override {} virtual ~OrderComboCutEdge() override = default;
virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const override { V3GraphVertex* top) const override {
return new OrderComboCutEdge(graphp, fromp, top, *this); return new OrderComboCutEdge(graphp, fromp, top, *this);
@ -503,7 +503,7 @@ public:
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: OrderEdge{graphp, fromp, top, WEIGHT_COMBO, CUTABLE} {} : OrderEdge{graphp, fromp, top, WEIGHT_COMBO, CUTABLE} {}
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_POSTCUT; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_POSTCUT; }
virtual ~OrderPostCutEdge() override {} virtual ~OrderPostCutEdge() override = default;
virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const override { V3GraphVertex* top) const override {
return new OrderPostCutEdge(graphp, fromp, top, *this); return new OrderPostCutEdge(graphp, fromp, top, *this);
@ -528,7 +528,7 @@ public:
V3GraphVertex* top) const override { V3GraphVertex* top) const override {
return new OrderPreCutEdge(graphp, fromp, top, *this); return new OrderPreCutEdge(graphp, fromp, top, *this);
} }
virtual ~OrderPreCutEdge() override {} virtual ~OrderPreCutEdge() override = default;
virtual string dotColor() const override { return "khaki"; } virtual string dotColor() const override { return "khaki"; }
virtual bool followComboConnected() const override { return false; } virtual bool followComboConnected() const override { return false; }
}; };

View File

@ -785,7 +785,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~ParamVisitor() override {} virtual ~ParamVisitor() override = default;
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -37,7 +37,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
V3Lexer() V3Lexer()
: V3LexerBase{nullptr} {} : V3LexerBase{nullptr} {}
~V3Lexer() override {} ~V3Lexer() override = default;
// METHODS // METHODS
void unputString(const char* textp, size_t length) { void unputString(const char* textp, size_t length) {
// Add characters to input stream in back-to-front order // Add characters to input stream in back-to-front order

View File

@ -50,7 +50,7 @@ public:
pushScope(findNewTable(rootp)); pushScope(findNewTable(rootp));
m_symCurrentp = symCurrentp(); m_symCurrentp = symCurrentp();
} }
~V3ParseSym() {} ~V3ParseSym() = default;
private: private:
// METHODS // METHODS

View File

@ -253,8 +253,8 @@ private:
CpMap m_seen; // Set of vertices we've seen CpMap m_seen; // Set of vertices we've seen
// CONSTRUCTORS // CONSTRUCTORS
PartPropagateCpSelfTest() {} PartPropagateCpSelfTest() = default;
~PartPropagateCpSelfTest() {} ~PartPropagateCpSelfTest() = default;
// METHODS // METHODS
protected: protected:
@ -368,8 +368,8 @@ public:
// in the future, using another Accessor adaptor. // in the future, using another Accessor adaptor.
class CpCostAccessor { class CpCostAccessor {
public: public:
CpCostAccessor() {} CpCostAccessor() = default;
~CpCostAccessor() {} ~CpCostAccessor() = default;
// Return cost of this node // Return cost of this node
uint32_t cost(const V3GraphVertex* vxp) const { uint32_t cost(const V3GraphVertex* vxp) const {
const LogicMTask* mtaskp = dynamic_cast<const LogicMTask*>(vxp); const LogicMTask* mtaskp = dynamic_cast<const LogicMTask*>(vxp);
@ -692,8 +692,8 @@ private:
// which is a unique and stable serial number. // which is a unique and stable serial number.
class MTaskIdLessThan { class MTaskIdLessThan {
public: public:
MTaskIdLessThan() {} MTaskIdLessThan() = default;
virtual ~MTaskIdLessThan() {} virtual ~MTaskIdLessThan() = default;
virtual bool operator()(const AbstractMTask* lhsp, const AbstractMTask* rhsp) const { virtual bool operator()(const AbstractMTask* lhsp, const AbstractMTask* rhsp) const {
return lhsp->id() < rhsp->id(); return lhsp->id() < rhsp->id();
} }
@ -739,7 +739,7 @@ public:
m_bp = ap; m_bp = ap;
} }
} }
virtual ~SiblingMC() {} virtual ~SiblingMC() = default;
// METHODS // METHODS
LogicMTask* ap() const { return m_ap; } LogicMTask* ap() const { return m_ap; }
LogicMTask* bp() const { return m_bp; } LogicMTask* bp() const { return m_bp; }
@ -1663,7 +1663,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
explicit DpiImportCallVisitor(AstNode* nodep) { iterate(nodep); } explicit DpiImportCallVisitor(AstNode* nodep) { iterate(nodep); }
bool hasDpiHazard() const { return m_hasDpiHazard; } bool hasDpiHazard() const { return m_hasDpiHazard; }
virtual ~DpiImportCallVisitor() override {} virtual ~DpiImportCallVisitor() override = default;
private: private:
VL_UNCOPYABLE(DpiImportCallVisitor); VL_UNCOPYABLE(DpiImportCallVisitor);
@ -2052,7 +2052,7 @@ public:
, m_sandbagNumerator{sandbagNumerator} , m_sandbagNumerator{sandbagNumerator}
, m_sandbagDenom{sandbagDenom} , m_sandbagDenom{sandbagDenom}
, m_ready{m_mtaskCmp} {} , m_ready{m_mtaskCmp} {}
~PartPackMTasks() {} ~PartPackMTasks() = default;
// METHODS // METHODS
uint32_t completionTime(const ExecMTask* mtaskp, uint32_t thread) { uint32_t completionTime(const ExecMTask* mtaskp, uint32_t thread) {

View File

@ -41,7 +41,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
explicit V3Partition(V3Graph* fineDepsGraphp) explicit V3Partition(V3Graph* fineDepsGraphp)
: m_fineDepsGraphp{fineDepsGraphp} {} : m_fineDepsGraphp{fineDepsGraphp} {}
~V3Partition() {} ~V3Partition() = default;
// METHODS // METHODS
@ -83,7 +83,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
PartPtrIdMap() {} PartPtrIdMap() = default;
// METHODS // METHODS
vluint64_t findId(const void* ptrp) const { vluint64_t findId(const void* ptrp) const {
const auto it = m_id.find(ptrp); const auto it = m_id.find(ptrp);

View File

@ -32,7 +32,7 @@ class AbstractMTask : public V3GraphVertex {
public: public:
AbstractMTask(V3Graph* graphp) AbstractMTask(V3Graph* graphp)
: V3GraphVertex{graphp} {} : V3GraphVertex{graphp} {}
virtual ~AbstractMTask() override {} virtual ~AbstractMTask() override = default;
virtual uint32_t id() const = 0; virtual uint32_t id() const = 0;
virtual uint32_t cost() const = 0; virtual uint32_t cost() const = 0;
}; };
@ -44,7 +44,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
AbstractLogicMTask(V3Graph* graphp) AbstractLogicMTask(V3Graph* graphp)
: AbstractMTask{graphp} {} : AbstractMTask{graphp} {}
virtual ~AbstractLogicMTask() override {} virtual ~AbstractLogicMTask() override = default;
// METHODS // METHODS
// Set of logic vertices in this mtask. Order is not significant. // Set of logic vertices in this mtask. Order is not significant.
virtual const VxList* vertexListp() const = 0; virtual const VxList* vertexListp() const = 0;

View File

@ -83,7 +83,7 @@ public:
VDefineRef(const string& name, const string& params) VDefineRef(const string& name, const string& params)
: m_name{name} : m_name{name}
, m_params{params} {} , m_params{params} {}
~VDefineRef() {} ~VDefineRef() = default;
}; };
//************************************************************************* //*************************************************************************
@ -99,7 +99,7 @@ public:
VPreIfEntry(bool on, bool everOn) VPreIfEntry(bool on, bool everOn)
: m_on{on} : m_on{on}
, m_everOn{everOn || on} {} // Note everOn includes new state , m_everOn{everOn || on} {} // Note everOn includes new state
~VPreIfEntry() {} ~VPreIfEntry() = default;
}; };
//************************************************************************* //*************************************************************************

View File

@ -103,7 +103,7 @@ protected:
public: public:
static V3PreProc* createPreProc(FileLine* fl); static V3PreProc* createPreProc(FileLine* fl);
virtual ~V3PreProc() {} // LCOV_EXCL_LINE // Persistent virtual ~V3PreProc() = default; // LCOV_EXCL_LINE // Persistent
}; };
#endif // Guard #endif // Guard

View File

@ -151,8 +151,8 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
V3PreShellImp() {} V3PreShellImp() = default;
~V3PreShellImp() {} ~V3PreShellImp() = default;
}; };
V3PreShellImp V3PreShellImp::s_preImp; V3PreShellImp V3PreShellImp::s_preImp;

View File

@ -75,7 +75,7 @@ public:
UINFO(4, " PremitAssignVisitor on " << nodep << endl); UINFO(4, " PremitAssignVisitor on " << nodep << endl);
iterate(nodep); iterate(nodep);
} }
virtual ~PremitAssignVisitor() override {} virtual ~PremitAssignVisitor() override = default;
bool noOpt() const { return m_noopt; } bool noOpt() const { return m_noopt; }
}; };
@ -397,7 +397,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit PremitVisitor(AstNetlist* nodep) { iterate(nodep); } explicit PremitVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~PremitVisitor() override {} virtual ~PremitVisitor() override = default;
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -313,7 +313,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit ScopeVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ScopeVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ScopeVisitor() override {} virtual ~ScopeVisitor() override = default;
}; };
//###################################################################### //######################################################################
@ -391,7 +391,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit ScopeCleanupVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ScopeCleanupVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ScopeCleanupVisitor() override {} virtual ~ScopeCleanupVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -30,7 +30,7 @@ public:
static uint32_t s_serial = 0; static uint32_t s_serial = 0;
m_id = ++s_serial; m_id = ++s_serial;
} }
ScoreboardTestElem() {} ScoreboardTestElem() = default;
// METHODS // METHODS
static uint32_t scoreFn(const ScoreboardTestElem* elp) { return elp->m_score; } static uint32_t scoreFn(const ScoreboardTestElem* elp) { return elp->m_score; }

View File

@ -54,7 +54,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
SortByValueMap() {} SortByValueMap() = default;
class const_iterator { class const_iterator {
// TYPES // TYPES
@ -375,7 +375,7 @@ public:
explicit V3Scoreboard(UserScoreFnp scoreFnp, bool slowAsserts) explicit V3Scoreboard(UserScoreFnp scoreFnp, bool slowAsserts)
: m_scoreFnp{scoreFnp} : m_scoreFnp{scoreFnp}
, m_slowAsserts{slowAsserts} {} , m_slowAsserts{slowAsserts} {}
~V3Scoreboard() {} ~V3Scoreboard() = default;
// METHODS // METHODS

View File

@ -53,7 +53,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
SenTreeSet() {} SenTreeSet() = default;
// METHODS // METHODS
void add(AstSenTree* nodep) { m_trees.insert(nodep); } void add(AstSenTree* nodep) { m_trees.insert(nodep); }
@ -81,7 +81,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
SenTreeFinder() {} SenTreeFinder() = default;
// METHODS // METHODS
AstSenTree* getSenTree(AstSenTree* senTreep) { AstSenTree* getSenTree(AstSenTree* senTreep) {

View File

@ -57,7 +57,7 @@ public:
SimStackNode(AstFuncRef* funcp, V3TaskConnects* tconnects) SimStackNode(AstFuncRef* funcp, V3TaskConnects* tconnects)
: m_funcp{funcp} : m_funcp{funcp}
, m_tconnects{tconnects} {} , m_tconnects{tconnects} {}
~SimStackNode() {} ~SimStackNode() = default;
}; };
typedef std::deque<AstConst*> ConstDeque; typedef std::deque<AstConst*> ConstDeque;

View File

@ -225,7 +225,7 @@ class SliceVisitor : public AstNVisitor {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit SliceVisitor(AstNetlist* nodep) { iterate(nodep); } explicit SliceVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~SliceVisitor() override {} virtual ~SliceVisitor() override = default;
}; };
//###################################################################### //######################################################################

View File

@ -102,7 +102,7 @@ protected:
SplitNodeVertex(V3Graph* graphp, AstNode* nodep) SplitNodeVertex(V3Graph* graphp, AstNode* nodep)
: V3GraphVertex{graphp} : V3GraphVertex{graphp}
, m_nodep{nodep} {} , m_nodep{nodep} {}
virtual ~SplitNodeVertex() override {} virtual ~SplitNodeVertex() override = default;
// ACCESSORS // ACCESSORS
// Do not make accessor for nodep(), It may change due to // Do not make accessor for nodep(), It may change due to
// reordering a lower block, but we don't repair it // reordering a lower block, but we don't repair it
@ -119,7 +119,7 @@ class SplitPliVertex : public SplitNodeVertex {
public: public:
explicit SplitPliVertex(V3Graph* graphp, AstNode* nodep) explicit SplitPliVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex{graphp, nodep} {} : SplitNodeVertex{graphp, nodep} {}
virtual ~SplitPliVertex() override {} virtual ~SplitPliVertex() override = default;
virtual string name() const override { return "*PLI*"; } virtual string name() const override { return "*PLI*"; }
virtual string dotColor() const override { return "green"; } virtual string dotColor() const override { return "green"; }
}; };
@ -128,7 +128,7 @@ class SplitLogicVertex : public SplitNodeVertex {
public: public:
SplitLogicVertex(V3Graph* graphp, AstNode* nodep) SplitLogicVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex{graphp, nodep} {} : SplitNodeVertex{graphp, nodep} {}
virtual ~SplitLogicVertex() override {} virtual ~SplitLogicVertex() override = default;
virtual string dotColor() const override { return "yellow"; } virtual string dotColor() const override { return "yellow"; }
}; };
@ -136,7 +136,7 @@ class SplitVarStdVertex : public SplitNodeVertex {
public: public:
SplitVarStdVertex(V3Graph* graphp, AstNode* nodep) SplitVarStdVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex{graphp, nodep} {} : SplitNodeVertex{graphp, nodep} {}
virtual ~SplitVarStdVertex() override {} virtual ~SplitVarStdVertex() override = default;
virtual string dotColor() const override { return "skyblue"; } virtual string dotColor() const override { return "skyblue"; }
}; };
@ -144,7 +144,7 @@ class SplitVarPostVertex : public SplitNodeVertex {
public: public:
SplitVarPostVertex(V3Graph* graphp, AstNode* nodep) SplitVarPostVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex{graphp, nodep} {} : SplitNodeVertex{graphp, nodep} {}
virtual ~SplitVarPostVertex() override {} virtual ~SplitVarPostVertex() override = default;
virtual string name() const override { return string("POST ") + SplitNodeVertex::name(); } virtual string name() const override { return string("POST ") + SplitNodeVertex::name(); }
virtual string dotColor() const override { return "CadetBlue"; } virtual string dotColor() const override { return "CadetBlue"; }
}; };
@ -160,7 +160,7 @@ protected:
SplitEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight, SplitEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
bool cutable = CUTABLE) bool cutable = CUTABLE)
: V3GraphEdge{graphp, fromp, top, weight, cutable} {} : V3GraphEdge{graphp, fromp, top, weight, cutable} {}
virtual ~SplitEdge() override {} virtual ~SplitEdge() override = default;
public: public:
// Iterator for graph functions // Iterator for graph functions
@ -189,7 +189,7 @@ class SplitPostEdge : public SplitEdge {
public: public:
SplitPostEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitPostEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {} : SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
virtual ~SplitPostEdge() override {} virtual ~SplitPostEdge() override = default;
virtual bool followScoreboard() const override { return false; } virtual bool followScoreboard() const override { return false; }
virtual string dotColor() const override { return "khaki"; } virtual string dotColor() const override { return "khaki"; }
}; };
@ -198,7 +198,7 @@ class SplitLVEdge : public SplitEdge {
public: public:
SplitLVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitLVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {} : SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
virtual ~SplitLVEdge() override {} virtual ~SplitLVEdge() override = default;
virtual bool followScoreboard() const override { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const override { return "yellowGreen"; } virtual string dotColor() const override { return "yellowGreen"; }
}; };
@ -207,7 +207,7 @@ class SplitRVEdge : public SplitEdge {
public: public:
SplitRVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitRVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {} : SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
virtual ~SplitRVEdge() override {} virtual ~SplitRVEdge() override = default;
virtual bool followScoreboard() const override { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const override { return "green"; } virtual string dotColor() const override { return "green"; }
}; };
@ -216,7 +216,7 @@ struct SplitScorebdEdge : public SplitEdge {
public: public:
SplitScorebdEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitScorebdEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {} : SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
virtual ~SplitScorebdEdge() override {} virtual ~SplitScorebdEdge() override = default;
virtual bool followScoreboard() const override { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const override { return "blue"; } virtual string dotColor() const override { return "blue"; }
}; };
@ -227,7 +227,7 @@ struct SplitStrictEdge : public SplitEdge {
public: public:
SplitStrictEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitStrictEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE} {} : SplitEdge{graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE} {}
virtual ~SplitStrictEdge() override {} virtual ~SplitStrictEdge() override = default;
virtual bool followScoreboard() const override { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const override { return "blue"; } virtual string dotColor() const override { return "blue"; }
}; };
@ -443,7 +443,7 @@ class ReorderVisitor : public SplitReorderBaseVisitor {
// CONSTRUCTORS // CONSTRUCTORS
public: public:
explicit ReorderVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ReorderVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ReorderVisitor() override {} virtual ~ReorderVisitor() override = default;
// METHODS // METHODS
protected: protected:
@ -638,7 +638,7 @@ public:
// Visit through *nodep and map each AstNodeIf within to the set of // Visit through *nodep and map each AstNodeIf within to the set of
// colors it will participate in. Also find the whole set of colors. // colors it will participate in. Also find the whole set of colors.
explicit IfColorVisitor(AstAlways* nodep) { iterate(nodep); } explicit IfColorVisitor(AstAlways* nodep) { iterate(nodep); }
virtual ~IfColorVisitor() override {} virtual ~IfColorVisitor() override = default;
// METHODS // METHODS
const ColorSet& colors() const { return m_colors; } const ColorSet& colors() const { return m_colors; }
@ -703,7 +703,7 @@ public:
UINFO(6, " splitting always " << nodep << endl); UINFO(6, " splitting always " << nodep << endl);
} }
virtual ~EmitSplitVisitor() override {} virtual ~EmitSplitVisitor() override = default;
// METHODS // METHODS
void go() { void go() {
@ -804,7 +804,7 @@ public:
VL_DO_DANGLING(np->deleteTree(), np); VL_DO_DANGLING(np->deleteTree(), np);
} }
} }
virtual ~RemovePlaceholdersVisitor() override {} virtual ~RemovePlaceholdersVisitor() override = default;
virtual void visit(AstSplitPlaceholder* nodep) override { m_removeSet.insert(nodep); } virtual void visit(AstSplitPlaceholder* nodep) override { m_removeSet.insert(nodep); }
virtual void visit(AstNode* nodep) override { iterateChildren(nodep); } virtual void visit(AstNode* nodep) override { iterateChildren(nodep); }
@ -844,7 +844,7 @@ public:
} }
} }
virtual ~SplitVisitor() override {} virtual ~SplitVisitor() override = default;
// METHODS // METHODS
protected: protected:

View File

@ -58,7 +58,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit SplitAsFindVisitor(AstAlways* nodep) { iterate(nodep); } explicit SplitAsFindVisitor(AstAlways* nodep) { iterate(nodep); }
virtual ~SplitAsFindVisitor() override {} virtual ~SplitAsFindVisitor() override = default;
// METHODS // METHODS
AstVarScope* splitVscp() const { return m_splitVscp; } AstVarScope* splitVscp() const { return m_splitVscp; }
}; };
@ -118,7 +118,7 @@ public:
, m_modeMatch{modeMatch} { , m_modeMatch{modeMatch} {
iterate(nodep); iterate(nodep);
} }
virtual ~SplitAsCleanVisitor() override {} virtual ~SplitAsCleanVisitor() override = default;
}; };
//###################################################################### //######################################################################

Some files were not shown because too many files have changed in this diff Show More