[clang] [clang] Fix Variable Length Array `_Countof` Crash (PR #154627)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 21 04:18:47 PDT 2025
================
@@ -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)]);
----------------
AaronBallman wrote:
We should also add a codegen test to verify that we emit the correct LLVM IR to runtime evaluate the `_Countof`
https://github.com/llvm/llvm-project/pull/154627
More information about the cfe-commits
mailing list