[llvm] [Verifier] Reject va_start in non-variadic function (PR #88809)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 21:59:52 PDT 2024


https://github.com/efriedma-quic approved this pull request.

With autoupgrade, we'd replace it with undef or something like that, so you'd maintain the invariant in memory, so you maintain the invariant either way.  The real question is whether such invalid constructs have somehow leaked into existing IR files despite clang not generating them.

That said, thinking about it a bit more, it seems pretty unlikely; most IR using va_list is going to originate from C/Rust, and they can't ever generate bad IR like this as far as I know.  And I think LLVM transformations have been pretty consistent about not constructing invalid code through inlining etc.

So LGTM

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


More information about the llvm-commits mailing list