objective-c: don't involve properties when checking
under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159784 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 87acd1e..d67fb50 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -2700,7 +2700,8 @@
               isa<ObjCProtocolDecl>(overridden->getDeclContext()));
     
     if (CurrentClass && overridden->getDeclContext() != CurrentClass &&
-        isa<ObjCInterfaceDecl>(overridden->getDeclContext())) {
+        isa<ObjCInterfaceDecl>(overridden->getDeclContext()) &&
+        !overridden->isImplicit() /* not meant for properties */) {
       ObjCMethodDecl::param_iterator ParamI = ObjCMethod->param_begin(),
                                           E = ObjCMethod->param_end();
       ObjCMethodDecl::param_iterator PrevI = overridden->param_begin(),
diff --git a/test/SemaObjC/nowarn-superclass-method-mismatch.m b/test/SemaObjC/nowarn-superclass-method-mismatch.m
new file mode 100644
index 0000000..b211cde
--- /dev/null
+++ b/test/SemaObjC/nowarn-superclass-method-mismatch.m
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1  -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -Wsuper-class-method-mismatch -verify %s
+// rdar://11793793
+
+@class NSString;
+
+@interface Super
+@property (nonatomic) NSString *thingy;
+@property () __weak id PROP;
+@end
+
+@interface Sub : Super
+@end
+
+@implementation Sub
+- (void)setThingy:(NSString *)val
+{
+  [super setThingy:val];
+}
+@synthesize PROP;
+@end