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
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index d854f0b..3c20944 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -775,7 +775,9 @@
 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 @@
   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)