[PATCH] D132952: [Sema] disable -Wvla for function array parameters
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 30 11:12:52 PDT 2022
efriedma added a comment.
> We have the VariableArrayType to represent a VLA type and I think we're using that type when we should be using a variably modified type
The clang AST for function signatures encodes two types: the type as written, and the type after promotion. Semantic analysis always uses the type after promotion, but the type as written is useful if you're trying to do source rewriting, or something like that.
We could theoretically mess with the AST representation somehow, but I don't see any compelling reason to. We probably just want to emit the warn_vla_used diagnostic somewhere else.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132952/new/
https://reviews.llvm.org/D132952
More information about the cfe-commits
mailing list