[clang-tools-extra] r281313 - [clang-tidy] Fix naming in container-size-empty.
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 03:19:13 PDT 2016
Author: omtcyfz
Date: Tue Sep 13 05:19:13 2016
New Revision: 281313
URL: http://llvm.org/viewvc/llvm-project?rev=281313&view=rev
Log:
[clang-tidy] Fix naming in container-size-empty.
Modified:
clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmptyCheck.cpp?rev=281313&r1=281312&r2=281313&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmptyCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmptyCheck.cpp Tue Sep 13 05:19:13 2016
@@ -29,7 +29,7 @@ void ContainerSizeEmptyCheck::registerMa
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::registerMa
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"),
More information about the cfe-commits
mailing list