[clang-tidy] Fix naming in container-size-empty.
authorKirill Bobyrev <omtcyfz@gmail.com>
Tue, 13 Sep 2016 10:19:13 +0000 (10:19 +0000)
committerKirill Bobyrev <omtcyfz@gmail.com>
Tue, 13 Sep 2016 10:19:13 +0000 (10:19 +0000)
llvm-svn: 281313

clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp

index 0894c78..01a4458 100644 (file)
@@ -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"),