Be more conservative about diagnosing "incorrect" uses of __weak:
allow them to be written in certain kinds of user declaration and
diagnose on the use-site instead.

Also, improve and fix some diagnostics relating to __weak and
properties.

rdar://23228631

llvm-svn: 251384
diff --git a/clang/test/SemaObjC/arc-no-runtime.m b/clang/test/SemaObjC/arc-no-runtime.m
index c5820d4..cc540f6 100644
--- a/clang/test/SemaObjC/arc-no-runtime.m
+++ b/clang/test/SemaObjC/arc-no-runtime.m
@@ -2,7 +2,7 @@
 
 // rdar://problem/9150784
 void test(void) {
-  __weak id x; // expected-error {{the current deployment target does not support automated __weak references}}
+  __weak id x; // expected-error {{cannot create __weak reference because the current deployment target does not support weak references}}
   __weak void *v; // expected-warning {{'__weak' only applies to Objective-C object or block pointer types}}
 }
 
@@ -12,5 +12,5 @@
 
 @implementation A
 // rdar://9605088
-@synthesize testObjectWeakProperty; // expected-error {{the current deployment target does not support automated __weak references}}
+@synthesize testObjectWeakProperty; // expected-error {{cannot synthesize weak property because the current deployment target does not support weak references}}
 @end