mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-11 10:26:44 +00:00
[clang-tidy] Fix naming in container-size-empty.
llvm-svn: 281313
This commit is contained in:
parent
882dc72b38
commit
0d0bbfd63e
@ -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"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user