Skip to content

Commit

Permalink
Add __has_feature(attribute_availability_with_version_underscores).
Browse files Browse the repository at this point in the history
This goes with r218884 from, um, last autumn.

rdar://problem/21754114

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242480 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jrose-apple committed Jul 16, 2015
1 parent e546956 commit 320e3c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Lex/PPMacroExpansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("attribute_availability", true)
.Case("attribute_availability_with_message", true)
.Case("attribute_availability_app_extension", true)
.Case("attribute_availability_with_version_underscores", true)
.Case("attribute_cf_returns_not_retained", true)
.Case("attribute_cf_returns_retained", true)
.Case("attribute_cf_returns_on_parameters", true)
Expand Down
4 changes: 4 additions & 0 deletions test/SemaObjC/attr-availability-1.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// RUN: %clang_cc1 -x objective-c++ -std=c++03 -triple x86_64-apple-darwin9.0.0 -fsyntax-only -verify %s
// rdar://18490958

#if !__has_feature(attribute_availability_with_version_underscores)
# error "missing feature"
#endif

@protocol P
- (void)proto_method __attribute__((availability(macosx,introduced=10_1,deprecated=10_2))); // expected-note 2 {{'proto_method' has been explicitly marked deprecated here}}
@end
Expand Down

0 comments on commit 320e3c5

Please sign in to comment.