diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-04 23:16:13 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-04 23:16:13 +0000 |
commit | 783ffde6d3f0eef6c4e7510c14a3b9f78dd2a327 (patch) | |
tree | bf7a55dd4f3d2f62ae497bc1677992af31fcde14 /clang/lib | |
parent | fd5e54da2de7954db03d3eba051c28381df5a4a7 (diff) | |
download | bcm5719-llvm-783ffde6d3f0eef6c4e7510c14a3b9f78dd2a327.tar.gz bcm5719-llvm-783ffde6d3f0eef6c4e7510c14a3b9f78dd2a327.zip |
objc: When issuing warning for missing synthesis for
properties in classes declared with objc_suppress_autosynthesis
attribute, pinpoint location of the said class in a note.
llvm-svn: 147562
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index efef7caadcc..45c47756347 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1394,6 +1394,11 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl, << Prop->getDeclName() << Prop->getGetterName(); Diag(Prop->getLocation(), diag::note_property_declare); + if (LangOpts.ObjCDefaultSynthProperties && LangOpts.ObjCNonFragileABI2) + if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CDecl)) + if (const ObjCInterfaceDecl *RID = ID->isObjCSuppressAutosynthesis()) + Diag(RID->getLocation(), diag::note_suppressed_class_declare); + } if (!Prop->isReadOnly() && !InsMap.count(Prop->getSetterName())) { @@ -1404,6 +1409,10 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl, << Prop->getDeclName() << Prop->getSetterName(); Diag(Prop->getLocation(), diag::note_property_declare); + if (LangOpts.ObjCDefaultSynthProperties && LangOpts.ObjCNonFragileABI2) + if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CDecl)) + if (const ObjCInterfaceDecl *RID = ID->isObjCSuppressAutosynthesis()) + Diag(RID->getLocation(), diag::note_suppressed_class_declare); } } } |