================
@@ -11767,6 +11767,25 @@ static void CheckImplicitArgumentConversions(Sema &S,
const CallExpr *TheCall,
SourceLocation CC) {
for (unsigned I = 0, N = TheCall->getNumArgs(); I < N; ++I) {
const Expr *CurrA = TheCall->getArg(I);
+
+ if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(CurrA))
+ // We shouldnt skip over any node here as it may be an attempt to silence
+ // the warning
+ if (auto *CCE = dyn_cast<CXXConstructExpr>(MTE->getSubExpr()))
----------------
AaronBallman wrote:
```suggestion
if (const auto *MTE = dyn_cast<MaterializeTemporaryExpr>(CurrA))
// We shouldnt skip over any node here as it may be an attempt to silence
// the warning.
if (const auto *CCE = dyn_cast<CXXConstructExpr>(MTE->getSubExpr()))
```
A few nits with the const correctness and the full stop at the end of the
comment.
https://github.com/llvm/llvm-project/pull/143990
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits