summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 92f167dcf29..661124c579f 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud