diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-14 23:52:54 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-14 23:52:54 +0000 |
commit | 2574a68e5cca0171f1e8c09373cb2f7e612ab77e (patch) | |
tree | 6cacccd32b8026d8f50e01e8348690156537c849 /lib/Sema/SemaDeclObjC.cpp | |
parent | e7a18c88b77523cf1085d239fd373770ba5791f1 (diff) |
Don't warn if result/argument type of an implemented
method is a qualified id which conforms to the matching type
of its method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index d854f0b50c..3c209440b0 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -775,7 +775,9 @@ void Sema::WarnUndefinedMethod(SourceLocation ImpLoc, ObjCMethodDecl *method, void Sema::WarnConflictingTypedMethods(ObjCMethodDecl *ImpMethodDecl, ObjCMethodDecl *IntfMethodDecl) { if (!Context.typesAreCompatible(IntfMethodDecl->getResultType(), - ImpMethodDecl->getResultType())) { + ImpMethodDecl->getResultType()) && + !QualifiedIdConformsQualifiedId(IntfMethodDecl->getResultType(), + ImpMethodDecl->getResultType())) { Diag(ImpMethodDecl->getLocation(), diag::warn_conflicting_ret_types) << ImpMethodDecl->getDeclName() << IntfMethodDecl->getResultType() << ImpMethodDecl->getResultType(); @@ -785,7 +787,8 @@ void Sema::WarnConflictingTypedMethods(ObjCMethodDecl *ImpMethodDecl, for (ObjCMethodDecl::param_iterator IM = ImpMethodDecl->param_begin(), IF = IntfMethodDecl->param_begin(), EM = ImpMethodDecl->param_end(); IM != EM; ++IM, ++IF) { - if (Context.typesAreCompatible((*IF)->getType(), (*IM)->getType())) + if (Context.typesAreCompatible((*IF)->getType(), (*IM)->getType()) || + QualifiedIdConformsQualifiedId((*IF)->getType(), (*IM)->getType())) continue; Diag((*IM)->getLocation(), diag::warn_conflicting_param_types) |