summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-04 16:01:24 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-04 16:01:24 +0000
commitba97c37ccd06d3ba379bbdb3f6131a30aaf32c96 (patch)
treea9c5310f6854ee7b26d4e439b1c4aa0c466b363b
parentcc0d7eeb6dbf4aa1efad895ff2b8568000b02461 (diff)
downloadbcm5719-llvm-ba97c37ccd06d3ba379bbdb3f6131a30aaf32c96.tar.gz
bcm5719-llvm-ba97c37ccd06d3ba379bbdb3f6131a30aaf32c96.zip
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
llvm-svn: 217167
-rw-r--r--clang/include/clang/ASTMatchers/Dynamic/VariantValue.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h b/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
index cf805c685f7..d06b77cc04d 100644
--- a/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
+++ b/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
@@ -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;
OpenPOWER on IntegriCloud