From 0d0bbfd63e4887b9848f0b2b6cbd6bf588ff869e Mon Sep 17 00:00:00 2001 From: Kirill Bobyrev Date: Tue, 13 Sep 2016 10:19:13 +0000 Subject: [PATCH] [clang-tidy] Fix naming in container-size-empty. llvm-svn: 281313 --- .../clang-tidy/readability/ContainerSizeEmptyCheck.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp index 0894c78..01a4458 100644 --- a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp @@ -29,7 +29,7 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) { if (!getLangOpts().CPlusPlus) return; - const auto validContainer = cxxRecordDecl(isSameOrDerivedFrom( + const auto ValidContainer = cxxRecordDecl(isSameOrDerivedFrom( namedDecl( has(cxxMethodDecl( isConst(), parameterCountIs(0), isPublic(), hasName("size"), @@ -54,9 +54,9 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) { hasParent(explicitCastExpr(hasDestinationType(booleanType())))); Finder->addMatcher( - cxxMemberCallExpr(on(expr(anyOf(hasType(validContainer), - hasType(pointsTo(validContainer)), - hasType(references(validContainer)))) + cxxMemberCallExpr(on(expr(anyOf(hasType(ValidContainer), + hasType(pointsTo(ValidContainer)), + hasType(references(ValidContainer)))) .bind("STLObject")), callee(cxxMethodDecl(hasName("size"))), WrongUse) .bind("SizeCallExpr"), -- 2.7.4