objc: after issuing the warning on direct use of __attribute__((NSObject))
on properties, prevent consequential error diagnostics. // rdar://10591336
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146737 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 63714fd..1626bf1 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1753,10 +1753,8 @@
return;
}
}
- else {
+ else
S.Diag(D->getLocation(), diag::warn_nsobject_attribute);
- return;
- }
D->addAttr(::new (S.Context) ObjCNSObjectAttr(Attr.getRange(), S.Context));
}