diff options
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index d826ea8d84..53de50c16c 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/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); |