diff --git a/src/V3Dfg.h b/src/V3Dfg.h index 247a177b3..5d86805f8 100644 --- a/src/V3Dfg.h +++ b/src/V3Dfg.h @@ -101,13 +101,15 @@ class DfgGraph final { DfgGraph* m_graphp; // The referenced graph public: - explicit UserDataInUse(DfgGraph* graphp) + // cppcheck-suppress noExplicitConstructor + UserDataInUse(DfgGraph* graphp) : m_graphp{graphp} {} - VL_UNCOPYABLE(UserDataInUse); - explicit UserDataInUse(UserDataInUse&& that) { + // cppcheck-suppress noExplicitConstructor + UserDataInUse(UserDataInUse&& that) { UASSERT(that.m_graphp, "Moving from empty"); m_graphp = vlstd::exchange(that.m_graphp, nullptr); } + VL_UNCOPYABLE(UserDataInUse); UserDataInUse& operator=(UserDataInUse&& that) { UASSERT(that.m_graphp, "Moving from empty"); m_graphp = vlstd::exchange(that.m_graphp, nullptr); diff --git a/src/V3File.h b/src/V3File.h index db1104ae2..ba2b5c6d1 100644 --- a/src/V3File.h +++ b/src/V3File.h @@ -285,7 +285,7 @@ public: explicit V3OutVFile(const string& filename) : V3OutCFile{filename, V3OutFormatter::LA_VERILOG} {} ~V3OutVFile() override = default; - virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); } + void putsHeader() override { puts("// Verilated -*- Verilog -*-\n"); } }; class V3OutXmlFile final : public V3OutFile {