summaryrefslogtreecommitdiffstats
path: root/test/Sema/types.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-12 05:25:55 +0000
committerChris Lattner <sabre@nondot.org>2008-12-12 05:25:55 +0000
commitf345accce09fe4243310d0cb6a4a0fd09caee8cf (patch)
tree8bd649fa7ebeb9ae237b107f81da5e32d1841523 /test/Sema/types.c
parent35345640442594acbc29445fbde4874a6e4c860a (diff)
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
Diffstat (limited to 'test/Sema/types.c')
-rw-r--r--test/Sema/types.c10
1 files changed, 10 insertions, 0 deletions
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)}}
+
+