From b9ea09c4451cb8f33ffd41d22b7dd10e8a68c5c8 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 17 Sep 2015 13:31:25 +0000 Subject: Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886 --- clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp') diff --git a/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp b/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp index 5bd9f75c815..cd264268a6f 100644 --- a/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp @@ -19,11 +19,12 @@ namespace tidy { void SizeofContainerCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( expr(unless(isInTemplateInstantiation()), - expr(sizeOfExpr(has(expr(hasType(hasCanonicalType(hasDeclaration( - recordDecl(matchesName("^(::std::|::string)"), - unless(matchesName("^::std::(bitset|array)$")), - hasMethod(methodDecl(hasName("size"), isPublic(), - isConst())))))))))) + expr(sizeOfExpr(has( + expr(hasType(hasCanonicalType(hasDeclaration(cxxRecordDecl( + matchesName("^(::std::|::string)"), + unless(matchesName("^::std::(bitset|array)$")), + hasMethod(cxxMethodDecl(hasName("size"), isPublic(), + isConst())))))))))) .bind("sizeof"), // Ignore ARRAYSIZE() pattern. unless(hasAncestor(binaryOperator( -- cgit v1.2.3