Made EqualityContext destructor virtual as the class has a virtual method + added -Wnon-virtual-dtor to catch similar cases in the future (#1411)

This commit is contained in:
pk19604014
2022-07-21 18:18:32 -07:00
committed by GitHub
parent 93e19649aa
commit 891d95cd0b
2 changed files with 2 additions and 1 deletions
@@ -123,6 +123,7 @@ def _impl(ctx):
"-Wself-assign",
"-Wimplicit-fallthrough",
"-Wctad-maybe-unsupported",
"-Wnon-virtual-dtor",
# Unfortunately, LLVM isn't clean for this warning.
"-Wno-unused-parameter",
# Compile actions shouldn't link anything.
+1 -1
View File
@@ -126,7 +126,7 @@ class EqualityContext {
-> bool = 0;
protected:
~EqualityContext() = default;
virtual ~EqualityContext() = default;
};
auto TypeEqual(Nonnull<const Value*> t1, Nonnull<const Value*> t2,