[cfe-commits] r60923 - /cfe/trunk/test/Sema/types.c

Chris Lattner sabre at nondot.org
Thu Dec 11 21:25:56 PST 2008


Author: lattner
Date: Thu Dec 11 23:25:55 2008
New Revision: 60923

URL: http://llvm.org/viewvc/llvm-project?rev=60923&view=rev
Log:
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.

Added:
    cfe/trunk/test/Sema/types.c

Added: cfe/trunk/test/Sema/types.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/types.c?rev=60923&view=auto

==============================================================================
--- cfe/trunk/test/Sema/types.c (added)
+++ cfe/trunk/test/Sema/types.c Thu Dec 11 23:25:55 2008
@@ -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)}}
+
+





More information about the cfe-commits mailing list