================ @@ -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)]); ---------------- frederick-vs-ja wrote:
Oh, I forgot that trailing return type is not yet supported in C. Perhaps we can do this: ```c void test_func_fix_fix(int i, char (*a)[3][5], int (*x)[_Countof(*a)], char(*)[_Generic(x, int(*)[3] : 1)]); ``` Which effectively asserts that `typeof(x)` is `int(*)[3]`. https://github.com/llvm/llvm-project/pull/133333 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits