================ @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void func(int n) { + int grp[n][n]; + int (*ptr)[n]; + + for (int i = 0; i < n; i++) + ptr = &grp[i]; // expected-error {{incompatible assignment of pointers of variable-length array type 'int (*)[n]'; consider using a typedef to use the same variable-length array type for both operands}} +} ---------------- AaronBallman wrote:
You should add a newline to the end of the test file. We're missing some additional test coverage, but we can handle that once we know more about what direction we want to take the fix. https://github.com/llvm/llvm-project/pull/101261 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits