[clang] [clang] Diagnose VLA types from an enclosing function in local classes and blocks (PR #229697)
Ivan Ugryumov via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 02:24:35 PDT 2026
================
@@ -7017,6 +7017,15 @@ Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {
// that redeclarations will match.
TypeSourceInfo *TInfo = NewTD->getTypeSourceInfo();
QualType T = TInfo->getType();
+
+ // A member typedef cannot name a variably modified type whose bound is
+ // evaluated in an enclosing function.
+ if (NewTD->getDeclContext()->isRecord() &&
----------------
Servall4 wrote:
Removed
https://github.com/llvm/llvm-project/pull/229697
More information about the cfe-commits
mailing list