[cfe-commits] r47455 - /cfe/trunk/test/Sema/annotate.c

Nate Begeman natebegeman at mac.com
Thu Feb 21 11:44:17 PST 2008


Author: sampo
Date: Thu Feb 21 13:44:16 2008
New Revision: 47455

URL: http://llvm.org/viewvc/llvm-project?rev=47455&view=rev
Log:
add a test case

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

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

==============================================================================
--- cfe/trunk/test/Sema/annotate.c (added)
+++ cfe/trunk/test/Sema/annotate.c Thu Feb 21 13:44:16 2008
@@ -0,0 +1,7 @@
+// RUN: clang %s -fsyntax-only -verify
+
+void __attribute__((annotate("foo"))) foo(float *a) { 
+  __attribute__((annotate("bar"))) int x;
+  __attribute__((annotate(1))) int y; // expected-error {{argument to annotate attribute was not a string literal}}
+  __attribute__((annotate("bar", 1))) int z; // expected-error {{attribute requires 1 argument(s)}}
+}





More information about the cfe-commits mailing list