diff options
author | Julien Lerouge <jlerouge@apple.com> | 2011-09-09 22:41:49 +0000 |
---|---|---|
committer | Julien Lerouge <jlerouge@apple.com> | 2011-09-09 22:41:49 +0000 |
commit | 77f68bb90af93b95045fb994e7cd68137adcc132 (patch) | |
tree | 16930a6023a153032d79ad743e75cf1f5d54646f /test/Sema/annotate.c | |
parent | 712f2fcb70ae2eb0cb684d565e7d2cb76881006b (diff) |
Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/annotate.c')
-rw-r--r-- | test/Sema/annotate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/annotate.c b/test/Sema/annotate.c index 6f81491f1f..5b2727752b 100644 --- a/test/Sema/annotate.c +++ b/test/Sema/annotate.c @@ -4,4 +4,7 @@ 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 takes one argument}} + int u = __builtin_annotation(z, (char*) 0); // expected-error {{__builtin_annotation requires a non wide string constant}} + int v = __builtin_annotation(z, (char*) L"bar"); // expected-error {{__builtin_annotation requires a non wide string constant}} + int w = __builtin_annotation(z, "foo"); } |