]> granicus.if.org Git - clang/commitdiff
Testcase for something that already works. Clang agrees with Comeau,
authorChris Lattner <sabre@nondot.org>
Fri, 12 Dec 2008 05:25:55 +0000 (05:25 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 12 Dec 2008 05:25:55 +0000 (05:25 +0000)
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

test/Sema/types.c [new file with mode: 0644]

diff --git a/test/Sema/types.c b/test/Sema/types.c
new file mode 100644 (file)
index 0000000..208abce
--- /dev/null
@@ -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)}}
+
+