================
@@ -9,20 +9,20 @@ typedef int (*T)[2];
 restrict T x;
 
 typedef int *S[2];
-restrict S y; // expected-error {{restrict requires a pointer or reference 
('S' (aka 'int *[2]') is invalid)}}
-
-
+restrict S y;
----------------
AaronBallman wrote:

Can you also add a test for multidimensional arrays, like:
```
typedef int *S[2][2];
restrict S y;
```
and (this should already work because it's adding the restrict to a pointer to 
an array):
```
typedef int (*S)[2];
restrict S y;
```
and finally, can you add some type verification tests like (for each of the 
test cases):
```
static_assert(_Generic(typeof(y), int * restrict[2]: 1, default : 0));
```

https://github.com/llvm/llvm-project/pull/120896
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to