[clang] [clang][ThreadSafety] Fix a crash on a capability expression calling a pointer to member (PR #231995)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 06:46:23 PDT 2026


================
@@ -560,6 +560,9 @@ til::SExpr *SExprBuilder::translateCallExpr(const CallExpr *CE,
   }
 
   til::SExpr *E = translate(CE->getCallee(), Ctx);
+  // Explicitly propagate Undefined, when the callee couldn't be analyzed.
+  if (isa<til::Undefined>(E))
+    return new (Arena) til::Undefined(CE);
----------------
melver wrote:

Nit: `E` is already a `til::Undefined *` (and `Undefined::Cstmt` is unused), so this can just `return E;` to avoid another arena allocation.

https://github.com/llvm/llvm-project/pull/231995


More information about the cfe-commits mailing list