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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 10:50:04 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))
----------------
NeKon69 wrote:

Unfortunately I could not find any edge cases regarding this.

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


More information about the cfe-commits mailing list