summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp b/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp
index d591e46181d..188d28ae2c4 100644
--- a/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/SizeofContainerCheck.cpp
@@ -20,12 +20,12 @@ namespace misc {
void SizeofContainerCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
expr(unless(isInTemplateInstantiation()),
- expr(sizeOfExpr(has(
+ expr(sizeOfExpr(has(ignoringParenImpCasts(
expr(hasType(hasCanonicalType(hasDeclaration(cxxRecordDecl(
matchesName("^(::std::|::string)"),
unless(matchesName("^::std::(bitset|array)$")),
hasMethod(cxxMethodDecl(hasName("size"), isPublic(),
- isConst()))))))))))
+ isConst())))))))))))
.bind("sizeof"),
// Ignore ARRAYSIZE(<array of containers>) pattern.
unless(hasAncestor(binaryOperator(
OpenPOWER on IntegriCloud