rsmith marked 3 inline comments as done.
rsmith added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:5939
+    ElemTy = TryToFixInvalidVariablyModifiedType(ElemTy, Context,
+                                                 SizeIsNegative, Oversized);
+    if (ElemTy.isNull())
----------------
efriedma wrote:
> It's a little surprising to me that you need new code here... was this case 
> getting picked up by the SemaType code?
Yes, and it previously didn't work outside GNU mode: 
https://godbolt.org/z/ncqKvo

I suppose that means that it probably isn't important to handle this, but we 
have a test for the multi-level VLA -> constant array case and it seemed easy 
enough to make it work.


================
Comment at: clang/lib/Sema/SemaType.cpp:2278
       ArraySize, &SizeVal, Diagnoser,
-      (S.LangOpts.GNUMode || S.LangOpts.OpenCL) ? Sema::AllowFold
-                                                : Sema::NoFold);
+      S.LangOpts.OpenCL ? Sema::AllowFold : Sema::NoFold);
   if (Diagnoser.IsVLA)
----------------
efriedma wrote:
> efriedma wrote:
> > We probably want some note to explain why OpenCL is special here... if you 
> > can't figure out easily, please leave a FIXME.
> Oh, I see you posted a separate patch for that.
For posterity, that's D89520.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89523/new/

https://reviews.llvm.org/D89523

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D89523: P... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D895... Eli Friedman via Phabricator via cfe-commits
    • [PATCH] D895... Eli Friedman via Phabricator via cfe-commits
    • [PATCH] D895... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D895... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D895... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D895... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D895... Eli Friedman via Phabricator via cfe-commits
    • [PATCH] D895... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to