r217167 - Fix the clang -Werror build after r217152 by flagging a polymorphically used but statically owned hierarchy with a protected base dtor and final classes to satisfy -Wnon-virtual-dtor
David Blaikie
dblaikie at gmail.com
Thu Sep 4 09:01:24 PDT 2014
Author: dblaikie
Date: Thu Sep 4 11:01:24 2014
New Revision: 217167
URL: http://llvm.org/viewvc/llvm-project?rev=217167&view=rev
Log:
Fix the clang -Werror build after r217152 by flagging a polymorphically used but statically owned hierarchy with a protected base dtor and final classes to satisfy -Wnon-virtual-dtor
Modified:
cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h
Modified: cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h?rev=217167&r1=217166&r2=217167&view=diff
==============================================================================
--- cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h (original)
+++ cfe/trunk/include/clang/ASTMatchers/Dynamic/VariantValue.h Thu Sep 4 11:01:24 2014
@@ -110,6 +110,9 @@ class VariantMatcher {
ast_matchers::internal::VariadicOperatorFunction Func,
ArrayRef<VariantMatcher> InnerMatchers) const;
+ protected:
+ ~MatcherOps() {}
+
private:
ast_type_traits::ASTNodeKind NodeKind;
};
@@ -218,7 +221,7 @@ private:
};
template <typename T>
-struct VariantMatcher::TypedMatcherOps : VariantMatcher::MatcherOps {
+struct VariantMatcher::TypedMatcherOps final : VariantMatcher::MatcherOps {
TypedMatcherOps()
: MatcherOps(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()) {}
typedef ast_matchers::internal::Matcher<T> MatcherT;
More information about the cfe-commits
mailing list