mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 09:48:11 +00:00
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:
1 parent
93e19649aa
commit
891d95cd0b
2 files changed
+2
-1
No files matched your search
@@ -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.
|
||||
|
||||
@@ -126,7 +126,7 @@ class EqualityContext {
|
||||
-> bool = 0;
|
||||
|
||||
protected:
|
||||
~EqualityContext() = default;
|
||||
virtual ~EqualityContext() = default;
|
||||
};
|
||||
|
||||
auto TypeEqual(Nonnull<const Value*> t1, Nonnull<const Value*> t2,
|
||||
|
||||
Reference in new issue
Block a user