diff options
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/unnecessaryparen.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx index a39bcc813a63..287c080afb13 100644 --- a/compilerplugins/clang/unnecessaryparen.cxx +++ b/compilerplugins/clang/unnecessaryparen.cxx @@ -447,8 +447,9 @@ bool UnnecessaryParen::VisitVarDecl(const VarDecl* varDecl) return true; // these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]" - if (isa<CXXBindTemporaryExpr>(sub) - || isa<CXXFunctionalCastExpr>(sub)) + auto const sub2 = sub->IgnoreImplicit(); + if (isa<CXXTemporaryObjectExpr>(sub2) + || isa<CXXFunctionalCastExpr>(sub2)) return true; report( |