diff options
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticKinds.def | 2 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 12 | ||||
| -rw-r--r-- | clang/test/SemaObjC/interface-1.m | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/clang/include/clang/Basic/DiagnosticKinds.def b/clang/include/clang/Basic/DiagnosticKinds.def index 2da8b3673dd..2b0f5aef6ee 100644 --- a/clang/include/clang/Basic/DiagnosticKinds.def +++ b/clang/include/clang/Basic/DiagnosticKinds.def @@ -424,8 +424,6 @@ DIAG(err_undef_superclass, ERROR, "cannot find interface declaration for '%0', superclass of '%1'") DIAG(err_duplicate_class_def, ERROR, "duplicate interface declaration for class '%0'") -DIAG(err_undef_protocolref, ERROR, - "cannot find protocol definition for '%0', referenced by '%1'") DIAG(warn_undef_protocolref, WARNING, "cannot find protocol definition for '%0', referenced by '%1'") DIAG(err_duplicate_protocol_def, ERROR, diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 79f1e2d6823..3615ed30c6a 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -139,8 +139,8 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, for (unsigned int i = 0; i != NumProtocols; i++) { ObjCProtocolDecl* RefPDecl = ObjCProtocols[ProtocolNames[i].first]; if (!RefPDecl) - Diag(ProtocolNames[i].second, diag::err_undef_protocolref, - ProtocolNames[i].first->getName(), ClassName->getName()); + Diag(ProtocolNames[i].second, diag::err_undeclared_protocol, + ProtocolNames[i].first->getName()); else { if (RefPDecl->isForwardDecl()) Diag(ProtocolNames[i].second, diag::warn_undef_protocolref, @@ -225,8 +225,8 @@ Sema::DeclTy *Sema::ActOnStartProtocolInterface( for (unsigned int i = 0; i != NumProtoRefs; i++) { ObjCProtocolDecl *RefPDecl = ObjCProtocols[ProtoRefNames[i].first]; if (!RefPDecl) - Diag(ProtoRefNames[i].second, diag::err_undef_protocolref, - ProtoRefNames[i].first->getName(), ProtocolName->getName()); + Diag(ProtoRefNames[i].second, diag::err_undeclared_protocol, + ProtoRefNames[i].first->getName()); else { if (RefPDecl->isForwardDecl()) Diag(ProtoRefNames[i].second, diag::warn_undef_protocolref, @@ -439,8 +439,8 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, for (unsigned int i = 0; i != NumProtoRefs; i++) { ObjCProtocolDecl* RefPDecl = ObjCProtocols[ProtoRefNames[i].first]; if (!RefPDecl) - Diag(ProtoRefNames[i].second, diag::err_undef_protocolref, - ProtoRefNames[i].first->getName(), CategoryName->getName()); + Diag(ProtoRefNames[i].second, diag::err_undeclared_protocol, + ProtoRefNames[i].first->getName()); else { if (RefPDecl->isForwardDecl()) Diag(ProtoRefNames[i].second, diag::warn_undef_protocolref, diff --git a/clang/test/SemaObjC/interface-1.m b/clang/test/SemaObjC/interface-1.m index 0130a33f9b9..d93f29c4b6e 100644 --- a/clang/test/SemaObjC/interface-1.m +++ b/clang/test/SemaObjC/interface-1.m @@ -3,7 +3,7 @@ @interface NSWhatever : NSObject // expected-error {{cannot find interface declaration for 'NSObject'}} -<NSCopying> // expected-error {{cannot find protocol definition for 'NSCopying'}} +<NSCopying> // expected-error {{cannot find protocol declaration for 'NSCopying'}} @end |

