if (!getLangOpts().CPlusPlus)
return;
- const auto validContainer = cxxRecordDecl(isSameOrDerivedFrom(
+ const auto ValidContainer = cxxRecordDecl(isSameOrDerivedFrom(
namedDecl(
has(cxxMethodDecl(
isConst(), parameterCountIs(0), isPublic(), hasName("size"),
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"),