aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 92f167dcf2..661124c579 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3501,6 +3501,8 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagD,
}
ProcessDeclAttributes(NewFD, D);
+ if (T.getObjCGCAttr() == QualType::Weak)
+ Diag(Loc, diag::warn_attribute_weak_on_field);
if (D.getInvalidType() || InvalidDecl)
NewFD->setInvalidDecl();