summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
index b881e226e9c..46ce2a47b03 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
@@ -47,7 +47,8 @@ void RedundantStringInitCheck::registerMatchers(MatchFinder *Finder) {
// string bar("");
Finder->addMatcher(
namedDecl(
- varDecl(hasType(cxxRecordDecl(hasName("basic_string"))),
+ varDecl(hasType(hasUnqualifiedDesugaredType(recordType(
+ hasDeclaration(cxxRecordDecl(hasName("basic_string")))))),
hasInitializer(expr(ignoringImplicit(anyOf(
EmptyStringCtorExpr,
EmptyStringCtorExprWithTemporaries)))
OpenPOWER on IntegriCloud