================
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -std=gnu++20 -emit-llvm %s -o - >/dev/null
+
+int f() { return 1; }
+
+int test0() {
+  using X = int[f()];
+
+  struct S {
+    S() {
+      X x;
----------------
AV01DANC3 wrote:

Good catch! I agree with your example and I'll take a look at Sema shortly.

> we can't correctly compute the size of a variably modified type from within a 
> local class

Just to make sure I understand correctly: should we reject this even for 
simpler cases like my original example, where the type is only used to declare 
a local variable inside the constructor?

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