From: David Blaikie Date: Thu, 4 Sep 2014 16:01:24 +0000 (+0000) Subject: Fix the clang -Werror build after r217152 by flagging a polymorphically used but... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee0eab10e97818eb0ce570a35ea812aa27093ff9;p=clang 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217167 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/ASTMatchers/Dynamic/VariantValue.h b/include/clang/ASTMatchers/Dynamic/VariantValue.h index cf805c685f..d06b77cc04 100644 --- a/include/clang/ASTMatchers/Dynamic/VariantValue.h +++ b/include/clang/ASTMatchers/Dynamic/VariantValue.h @@ -110,6 +110,9 @@ class VariantMatcher { ast_matchers::internal::VariadicOperatorFunction Func, ArrayRef InnerMatchers) const; + protected: + ~MatcherOps() {} + private: ast_type_traits::ASTNodeKind NodeKind; }; @@ -218,7 +221,7 @@ private: }; template -struct VariantMatcher::TypedMatcherOps : VariantMatcher::MatcherOps { +struct VariantMatcher::TypedMatcherOps final : VariantMatcher::MatcherOps { TypedMatcherOps() : MatcherOps(ast_type_traits::ASTNodeKind::getFromNodeKind()) {} typedef ast_matchers::internal::Matcher MatcherT;