mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01: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:
@@ -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