[clang] Add more tests for _Countof (PR #133333)
Alejandro Colomar via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 07:04:46 PDT 2025
================
@@ -81,6 +89,22 @@ void test_with_function_param(int array[12], int (*array_ptr)[12], int static_ar
(void)_Countof(static_array); // expected-error {{'_Countof' requires an argument of array type; 'int *' invalid}}
}
+void test_func_fix_fix(int i, char (*a)[3][5], int (*x)[_Countof(*a)]);
+void test_func_fix_var(int i, char (*a)[3][i], int (*x)[_Countof(*a)]);
+void test_func_fix_uns(int i, char (*a)[3][*], int (*x)[_Countof(*a)]);
----------------
alejandro-colomar wrote:
Done.
https://github.com/llvm/llvm-project/pull/133333
More information about the cfe-commits
mailing list