================
@@ -92,3 +92,43 @@ extern __attribute__((address_space(0))) int 
type_attr_test_2;          // expec
 void invalid_param_fn(__attribute__((address_space(1))) int i); // 
expected-error {{parameter may not be qualified with an address space}}
 typeof(invalid_param_fn) invalid_param_1;
 typeof_unqual(invalid_param_fn) invalid_param_2;
+
+// Ensure restrict is stripped
+extern int *restrict p1;
+extern int *p2;
+extern typeof(p1) p1;
+extern typeof_unqual(p1) p2;
+
+// Ensure array qualifications are removed
+extern const int aci[2];
+extern const int acii[2][2];
+extern int ai[2];
+extern int aii[2][2];
+extern typeof(aci) aci;
+extern typeof_unqual(aci) ai;
+extern typeof(acii) acii;
+extern typeof_unqual(acii) aii;
+
+extern int *restrict arpi[2];
+extern int *restrict arpii[2][2];
+extern int *api[2];
+extern int *apii[2][2];
+extern typeof(arpi) arpi;
+extern typeof_unqual(arpi) api;
+extern typeof(arpii) arpii;
+extern typeof_unqual(arpii) apii;
----------------
AaronBallman wrote:

GCC also disagrees on these `typeof_unqual`s, but I think that behavior is also 
incorrect for the same reason as above.

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

Reply via email to