summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index d826ea8d84a..53de50c16cf 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -555,6 +555,14 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
return 0;
}
}
+ if ((IC->meth_begin() != IC->meth_end()) && AtLoc.isValid()) {
+ if (getLangOptions().ObjCAutoRefCount)
+ Diag(AtLoc, diag::error_property_after_method_impl);
+ else
+ Diag(AtLoc, diag::warn_property_after_method_impl);
+ ObjCMethodDecl *method = *(IC->meth_begin());
+ Diag(method->getLocation(), diag::note_method_declared_at);
+ }
} else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {
if (Synthesize) {
Diag(AtLoc, diag::error_synthesize_category_decl);
OpenPOWER on IntegriCloud