[clang] [LifeitimeSafety] Support C Language in LifetimeSafety (PR #203270)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 07:14:45 PDT 2026


================
@@ -324,6 +326,10 @@ void FactsGenerator::VisitCastExpr(const CastExpr *CE) {
       flow(Dest, Src, /*Kill=*/true);
     return;
   case CK_ArrayToPointerDecay:
+    // va_arg(ap, array_type) is UB and does not provide addressable array
+    // storage to model.
+    if (isa<VAArgExpr>(SubExpr))
----------------
Xazax-hun wrote:

Did this trigger a crash or a false positive? I wonder if `VAArgExpr` can appear at more places where it can wreak havoc. 

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


More information about the cfe-commits mailing list