diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-28 22:36:31 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-28 22:36:31 +0000 |
commit | ced0e6570a90e3e7ab09691fd7f04428f4e97977 (patch) | |
tree | e5ea6ede0be900dd45839d9d7df3ff721e39e29a | |
parent | bd7370a78604e9a20d698bfe328c1e43f12a0613 (diff) |
objective-C: clang, following gcc, warns on
use of stand-alone protocol as type and uses
id<proto>. Modify warning to say what compiler
is doing. // rdar//13158394
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176303 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticParseKinds.td | 2 | ||||
-rw-r--r-- | test/FixIt/fixit-objc.m | 2 | ||||
-rw-r--r-- | test/Parser/placeholder-recovery.m | 2 | ||||
-rw-r--r-- | test/SemaObjC/protocol-archane.m | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 2fbd99a688..05255d17e9 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -363,7 +363,7 @@ def note_objc_container_start : Note< "%select{class|protocol|category|class extension|implementation" "|category implementation}0 started here">; def warn_objc_protocol_qualifier_missing_id : Warning< - "protocol qualifiers without 'id' is archaic">; + "property has no object type specified; defaults to qualified 'id'">; def err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">; def err_illegal_super_cast : Error< "cannot cast 'super' (it isn't an expression)">; diff --git a/test/FixIt/fixit-objc.m b/test/FixIt/fixit-objc.m index 77099fccc9..ddcd87a6ac 100644 --- a/test/FixIt/fixit-objc.m +++ b/test/FixIt/fixit-objc.m @@ -11,7 +11,7 @@ @protocol X; void foo() { - <X> *P; // expected-warning{{protocol qualifiers without 'id' is archaic}} + <X> *P; // expected-warning{{property has no object type specified; defaults to qualified 'id'}} } @class A; diff --git a/test/Parser/placeholder-recovery.m b/test/Parser/placeholder-recovery.m index 1fc154955d..f7c5c30b51 100644 --- a/test/Parser/placeholder-recovery.m +++ b/test/Parser/placeholder-recovery.m @@ -5,7 +5,7 @@ // bogus 'archaic' warnings with bad location info. @protocol <#protocol name#> <NSObject> // expected-error 2{{expected identifier}} \ // expected-error{{cannot find protocol declaration for 'NSObject'}} \ -// expected-warning{{protocol qualifiers without 'id'}} +// expected-warning{{property has no object type specified; defaults to qualified 'id'}} <#methods#> // expected-error{{expected identifier}} diff --git a/test/SemaObjC/protocol-archane.m b/test/SemaObjC/protocol-archane.m index 49c9851122..9d1526d693 100644 --- a/test/SemaObjC/protocol-archane.m +++ b/test/SemaObjC/protocol-archane.m @@ -8,9 +8,9 @@ void bar(); void foo(id x) { bar((short<SomeProtocol>)x); // expected-error {{expected ')'}} expected-note {{to match this '('}} - bar((<SomeProtocol>)x); // expected-warning {{protocol qualifiers without 'id' is archaic}} + bar((<SomeProtocol>)x); // expected-warning {{property has no object type specified; defaults to qualified 'id'}} - [(<SomeProtocol>)x bar]; // expected-warning {{protocol qualifiers without 'id' is archaic}} + [(<SomeProtocol>)x bar]; // expected-warning {{property has no object type specified; defaults to qualified 'id'}} } @protocol MyProtocol @@ -37,6 +37,6 @@ Class <SomeProtocol> UnfortunateGCCExtension; @protocol Broken @end @interface Crash @end @implementation Crash -- (void)crashWith:(<Broken>)a { // expected-warning {{protocol qualifiers without 'id' is archaic}} +- (void)crashWith:(<Broken>)a { // expected-warning {{property has no object type specified; defaults to qualified 'id'}} } @end |