[clang] [clang] Fix crashes when passing VLA to va_arg (PR #119563)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 13 14:36:52 PST 2024


================
@@ -16538,6 +16538,13 @@ ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc,
         << TInfo->getTypeLoc().getSourceRange();
     }
 
+    if (TInfo->getType()->isVariableArrayType()) {
----------------
efriedma-quic wrote:

This should check for any array type; the issue with compatibility isn't specific to variadic arrays.

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


More information about the cfe-commits mailing list