[cfe-commits] r72908 - /cfe/trunk/test/Parser/pragma-weak.c

Eli Friedman eli.friedman at gmail.com
Thu Jun 4 17:50:43 PDT 2009


Author: efriedma
Date: Thu Jun  4 19:50:43 2009
New Revision: 72908

URL: http://llvm.org/viewvc/llvm-project?rev=72908&view=rev
Log:
Test for parsing #pragma weak.


Added:
    cfe/trunk/test/Parser/pragma-weak.c

Added: cfe/trunk/test/Parser/pragma-weak.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-weak.c?rev=72908&view=auto

==============================================================================
--- cfe/trunk/test/Parser/pragma-weak.c (added)
+++ cfe/trunk/test/Parser/pragma-weak.c Thu Jun  4 19:50:43 2009
@@ -0,0 +1,17 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+// Note that this puts the expected lines before the directives to work around
+// limitations in the -verify mode.
+
+int x;
+/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak
+#pragma weak x
+#pragma weak y
+int y;
+
+/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = =
+/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z =
+#pragma weak z = y
+
+/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a b
+/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a = x c





More information about the cfe-commits mailing list