Fix clang warning from previous commits.

This commit is contained in:
Wilson Snyder 2022-11-27 06:27:51 -05:00
parent fa4270b551
commit 5f583b0680
2 changed files with 6 additions and 4 deletions

View File

@ -101,13 +101,15 @@ class DfgGraph final {
DfgGraph* m_graphp; // The referenced graph DfgGraph* m_graphp; // The referenced graph
public: public:
explicit UserDataInUse(DfgGraph* graphp) // cppcheck-suppress noExplicitConstructor
UserDataInUse(DfgGraph* graphp)
: m_graphp{graphp} {} : m_graphp{graphp} {}
VL_UNCOPYABLE(UserDataInUse); // cppcheck-suppress noExplicitConstructor
explicit UserDataInUse(UserDataInUse&& that) { UserDataInUse(UserDataInUse&& that) {
UASSERT(that.m_graphp, "Moving from empty"); UASSERT(that.m_graphp, "Moving from empty");
m_graphp = vlstd::exchange(that.m_graphp, nullptr); m_graphp = vlstd::exchange(that.m_graphp, nullptr);
} }
VL_UNCOPYABLE(UserDataInUse);
UserDataInUse& operator=(UserDataInUse&& that) { UserDataInUse& operator=(UserDataInUse&& that) {
UASSERT(that.m_graphp, "Moving from empty"); UASSERT(that.m_graphp, "Moving from empty");
m_graphp = vlstd::exchange(that.m_graphp, nullptr); m_graphp = vlstd::exchange(that.m_graphp, nullptr);

View File

@ -285,7 +285,7 @@ public:
explicit V3OutVFile(const string& filename) explicit V3OutVFile(const string& filename)
: V3OutCFile{filename, V3OutFormatter::LA_VERILOG} {} : V3OutCFile{filename, V3OutFormatter::LA_VERILOG} {}
~V3OutVFile() override = default; ~V3OutVFile() override = default;
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); } void putsHeader() override { puts("// Verilated -*- Verilog -*-\n"); }
}; };
class V3OutXmlFile final : public V3OutFile { class V3OutXmlFile final : public V3OutFile {