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
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);

View File

@ -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 {