================ @@ -67,6 +68,48 @@ class DerefFuncDeleteExprVisitor const Decl *D = CE->getCalleeDecl(); if (D && D->hasBody()) return VisitBody(D->getBody()); + else { + auto name = safeGetName(D); + if (name == "ensureOnMainThread" || name == "ensureOnMainRunLoop") { + for (unsigned i = 0; i < CE->getNumArgs(); ++i) { + auto *Arg = CE->getArg(i); + if (FindLabmda(Arg)) + return true; + } + } + } + return false; + } + + bool FindLabmda(const Expr *E) { + while (E) { + if (auto *TempE = dyn_cast<MaterializeTemporaryExpr>(E)) { ---------------- rniwa wrote:
Ah, that's so nice! https://github.com/llvm/llvm-project/pull/107676 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits