diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp b/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp index 0d9c5ecd248..2f39f46e63f 100644 --- a/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp +++ b/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp @@ -33,7 +33,8 @@ void TwineLocalCheck::check(const MatchFinder::MatchResult &Result) { if (VD->hasInit()) { // Peel away implicit constructors and casts so we can see the actual type // of the initializer. - const Expr *C = VD->getInit(); + const Expr *C = VD->getInit()->IgnoreImplicit(); + while (isa<CXXConstructExpr>(C)) C = cast<CXXConstructExpr>(C)->getArg(0)->IgnoreParenImpCasts(); |