[clang] [clang] Diagnose VLA types from an enclosing function in local classes and blocks (PR #229697)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 13 15:53:39 PDT 2026
https://github.com/efriedma-quic commented:
I don't think it makes sense to have "captureVariablyModifiedType()" as a separate concept from "CheckVariablyModifiedTypeUse()"; we should be doing both checks in one unified function. If a variably modified type is defined in the same context as the use, we don't need to do anything special. If a use is in a lambda, and the variably modified type is defined in the parent of the lambda (or more generally, lambda x N ->definition context), we capture. Otherwise, it's an error.
https://github.com/llvm/llvm-project/pull/229697
More information about the cfe-commits
mailing list