================ @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -std=c2y -verify %s +// RUN: %clang_cc1 -std=c2y -verify -fexperimental-new-constant-interpreter %s +// expected-no-diagnostics + +void gh152826(char (*a)[*][5], int (*x)[_Countof (*a)]); ---------------- Mr-Anyone wrote:
> to make sure we handle nested VLAs properly. Sure. > We should also add a codegen test to verify that we emit the correct LLVM IR > to runtime evaluate the _Countof I am not sure how you would go about doing that. Because `[*]` seems to only appear in function prototypes and not definitions. [godbolt](https://godbolt.org/z/GPYh1Mvz4) C23 6.7.7.4: If the function declarator is not part of a definition of that function, parameters [...] may use the [*] notation in their sequences of declarator specifiers to specify variable length array types. https://github.com/llvm/llvm-project/pull/154627 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits