diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-07-21 20:43:11 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-07-21 20:43:11 +0000 |
| commit | 1ddd6d2b6b804e8036e60cfa500b31cce1373bc9 (patch) | |
| tree | 4454fe5189b68b411d049af48cf379df4e40fdfc /clang/test/SemaObjC/protocol-attribute.m | |
| parent | 19b3830142001b74e29ab5fa11ef76e87aaf7b1e (diff) | |
| download | bcm5719-llvm-1ddd6d2b6b804e8036e60cfa500b31cce1373bc9.tar.gz bcm5719-llvm-1ddd6d2b6b804e8036e60cfa500b31cce1373bc9.zip | |
Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that
GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now
Clang's behavior is more strict in this case, but more consistent. We will need to see how much
this fires on real code and determine whether this case should be downgraded to a warning.
Fixes <rdar://problem/8213093>.
llvm-svn: 109033
Diffstat (limited to 'clang/test/SemaObjC/protocol-attribute.m')
| -rw-r--r-- | clang/test/SemaObjC/protocol-attribute.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaObjC/protocol-attribute.m b/clang/test/SemaObjC/protocol-attribute.m index e04a39bda6c..52c980396ed 100644 --- a/clang/test/SemaObjC/protocol-attribute.m +++ b/clang/test/SemaObjC/protocol-attribute.m @@ -3,7 +3,7 @@ __attribute ((unavailable)) @protocol FwProto; // expected-note{{marked unavailable}} -Class <FwProto> cFw = 0; // expected-warning {{'FwProto' is unavailable}} +Class <FwProto> cFw = 0; // expected-error {{'FwProto' is unavailable}} __attribute ((deprecated)) @protocol MyProto1 @@ -35,12 +35,12 @@ Class <MyProto1> clsP1 = 0; // expected-warning {{'MyProto1' is deprecated}} @protocol FwProto @end // expected-note{{marked unavailable}} -@interface MyClass2 <FwProto> // expected-warning {{'FwProto' is unavailable}} +@interface MyClass2 <FwProto> // expected-error {{'FwProto' is unavailable}} @end __attribute ((unavailable)) __attribute ((deprecated)) @protocol XProto; // expected-note{{marked unavailable}} -id <XProto> idX = 0; // expected-warning {{'XProto' is unavailable}} expected-warning {{'XProto' is deprecated}} +id <XProto> idX = 0; // expected-error {{'XProto' is unavailable}} expected-warning {{'XProto' is deprecated}} int main () { |

