Skip to content

Commit ba97c37

Browse files
committed
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
1 parent cc0d7ee commit ba97c37

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/include/clang/ASTMatchers/Dynamic/VariantValue.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ class VariantMatcher {
110110
ast_matchers::internal::VariadicOperatorFunction Func,
111111
ArrayRef<VariantMatcher> InnerMatchers) const;
112112

113+
protected:
114+
~MatcherOps() {}
115+
113116
private:
114117
ast_type_traits::ASTNodeKind NodeKind;
115118
};
@@ -218,7 +221,7 @@ class VariantMatcher {
218221
};
219222

220223
template <typename T>
221-
struct VariantMatcher::TypedMatcherOps : VariantMatcher::MatcherOps {
224+
struct VariantMatcher::TypedMatcherOps final : VariantMatcher::MatcherOps {
222225
TypedMatcherOps()
223226
: MatcherOps(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()) {}
224227
typedef ast_matchers::internal::Matcher<T> MatcherT;

0 commit comments

Comments
 (0)