================
@@ -2996,3 +2978,28 @@ Attr *Sema::CreateAnnotationAttr(const ParsedAttr &AL) {
 
   return CreateAnnotationAttr(AL, Str, Args);
 }
+
+bool Sema::DiagnoseVLAInLocalClass(QualType T, SourceLocation Loc) {
+  if (T.isNull() || !T->isVariablyModifiedType())
+    return false;
+
+  const auto *TT = dyn_cast<TypedefType>(T.getTypePtr());
----------------
efriedma-quic wrote:

I suspect you need to find more than just typedefs.  Some types constructs 
which could also cause issues:

- decltype
- typeof
- auto

And maybe various bits of type sugar like parentheses; see 
CodeGenFunction::EmitVariablyModifiedType for potentially relevant constructs.

https://github.com/llvm/llvm-project/pull/183933
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to