From: Chris Lattner Date: Fri, 12 Dec 2008 05:25:55 +0000 (+0000) Subject: Testcase for something that already works. Clang agrees with Comeau, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f345accce09fe4243310d0cb6a4a0fd09caee8cf;p=clang Testcase for something that already works. Clang agrees with Comeau, and this makes sense. likely a gcc bug that it doesn't diagnose the bad restrict. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60923 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/types.c b/test/Sema/types.c new file mode 100644 index 0000000000..208abce3d9 --- /dev/null +++ b/test/Sema/types.c @@ -0,0 +1,10 @@ +// RUN: clang %s -pedantic -verify + +// rdar://6097662 +typedef int (*T)[2]; +restrict T x; + +typedef int *S[2]; +restrict S y; // expected-error {{restrict requires a pointer or reference ('S' is invalid)}} + +