Make warn-weak-field.m test pass again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64927 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 92f167d..661124c 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3501,6 +3501,8 @@
   }
 
   ProcessDeclAttributes(NewFD, D);
+  if (T.getObjCGCAttr() == QualType::Weak)
+    Diag(Loc, diag::warn_attribute_weak_on_field);
 
   if (D.getInvalidType() || InvalidDecl)
     NewFD->setInvalidDecl();