diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp index 1f1c140f027..8c43e6b754f 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp @@ -42,6 +42,8 @@ AST_MATCHER(VarDecl, hasWrittenNonListInitializer) { if (!Init) return false; + Init = Init->IgnoreImplicit(); + // The following test is based on DeclPrinter::VisitVarDecl() to find if an // initializer is implicit or not. if (const auto *Construct = dyn_cast<CXXConstructExpr>(Init)) { |