diff options
author | John McCall <rjmccall@apple.com> | 2010-11-08 19:48:17 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-08 19:48:17 +0000 |
commit | f71b45367f756137bdb0262519e6cc78d0376e4a (patch) | |
tree | 85cd7f1a9d91e00b757794a534617f4b2cb1f2a3 /clang/test | |
parent | fc82674b9c2ad9602b41c87a5664d60f5dddc597 (diff) | |
download | bcm5719-llvm-f71b45367f756137bdb0262519e6cc78d0376e4a.tar.gz bcm5719-llvm-f71b45367f756137bdb0262519e6cc78d0376e4a.zip |
Document Clang's support for attributes on individual enumerators and
tweak the documentation for deprecation-with-message. Provide __has_feature
tests for both. rdar://problem/8605692
llvm-svn: 118435
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Sema/attr-deprecated.c | 2 | ||||
-rw-r--r-- | clang/test/Sema/attr-unavailable-message.c | 2 | ||||
-rw-r--r-- | clang/test/Sema/enum.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-deprecated.c b/clang/test/Sema/attr-deprecated.c index f9cdaf067c6..b26171b86b0 100644 --- a/clang/test/Sema/attr-deprecated.c +++ b/clang/test/Sema/attr-deprecated.c @@ -109,3 +109,5 @@ void test20() { f = test20_a; // expected-warning {{'test20_a' is deprecated}} f = test20_b; } + +char test21[__has_feature(attribute_deprecated_with_message) ? 1 : -1]; diff --git a/clang/test/Sema/attr-unavailable-message.c b/clang/test/Sema/attr-unavailable-message.c index 4d07a238a9c..a1e047c8176 100644 --- a/clang/test/Sema/attr-unavailable-message.c +++ b/clang/test/Sema/attr-unavailable-message.c @@ -14,3 +14,5 @@ void test_foo() { double (*fp4)(double) = dfoo; // expected-error {{'dfoo' is unavailable: NO LONGER}} } + +char test2[__has_feature(attribute_unavailable_with_message) ? 1 : -1]; diff --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c index 64aa31bc4b6..d83b06f56ba 100644 --- a/clang/test/Sema/enum.c +++ b/clang/test/Sema/enum.c @@ -102,3 +102,5 @@ extern enum PR7911T PR7911V; // expected-warning{{ISO C forbids forward referenc void PR7911F() { switch (PR7911V); // expected-error {{statement requires expression of integer type}} } + +char test5[__has_feature(enumerator_attributes) ? 1 : -1]; |