summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-availability.c
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2016-08-16 17:44:11 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2016-08-16 17:44:11 +0000
commit5cd57177a51abc7b0bfe18f70566572dbccab9a0 (patch)
tree37e54d241289b11708d39bd977a59b43c3a31e42 /clang/test/Sema/attr-availability.c
parentc98ef718eab85e44701a23f63c1e69eb6e43cc51 (diff)
downloadbcm5719-llvm-5cd57177a51abc7b0bfe18f70566572dbccab9a0.tar.gz
bcm5719-llvm-5cd57177a51abc7b0bfe18f70566572dbccab9a0.zip
[ObjC] Warn on unguarded use of partial declaration
This commit adds a traversal of the AST after Sema of a function that diagnoses unguarded references to declarations that are partially available (based on availability attributes). This traversal is only done when we would otherwise emit -Wpartial-availability. This commit is part of a feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential revision: https://reviews.llvm.org/D23003 llvm-svn: 278826
Diffstat (limited to 'clang/test/Sema/attr-availability.c')
-rw-r--r--clang/test/Sema/attr-availability.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Sema/attr-availability.c b/clang/test/Sema/attr-availability.c
index 8fe6be3804e..a4b40ff9e0c 100644
--- a/clang/test/Sema/attr-availability.c
+++ b/clang/test/Sema/attr-availability.c
@@ -30,7 +30,7 @@ void test_10095131() {
ATSFontGetPostScriptName(100); // expected-error {{'ATSFontGetPostScriptName' is unavailable: obsoleted in macOS 9.0 - use ATSFontGetFullPostScriptName}}
#if defined(WARN_PARTIAL)
- // expected-warning@+2 {{is partial: introduced in macOS 10.8}} expected-note@+2 {{explicitly redeclare 'PartiallyAvailable' to silence this warning}}
+ // expected-warning@+2 {{is only available on macOS 10.8 or newer}} expected-note@+2 {{enclose 'PartiallyAvailable' in an @available check to silence this warning}}
#endif
PartiallyAvailable();
}
OpenPOWER on IntegriCloud