[clang-tidy] Fix naming in container-size-empty.

llvm-svn: 281313
This commit is contained in:
Kirill Bobyrev 2016-09-13 10:19:13 +00:00
parent 882dc72b38
commit 0d0bbfd63e

View 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"),