summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 49fcfbf2f37..afcf3cc63ae 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -2712,8 +2712,10 @@ Decl *Sema::ActOnMethodDeclaration(
IMD = IDecl->lookupMethod(ObjCMethod->getSelector(),
ObjCMethod->isInstanceMethod());
if (ObjCMethod->hasAttrs() &&
- containsInvalidMethodImplAttribute(IMD, ObjCMethod->getAttrs()))
+ containsInvalidMethodImplAttribute(IMD, ObjCMethod->getAttrs())) {
Diag(EndLoc, diag::warn_attribute_method_def);
+ Diag(IMD->getLocation(), diag::note_method_declared_at);
+ }
} else {
cast<DeclContext>(ClassDecl)->addDecl(ObjCMethod);
}
OpenPOWER on IntegriCloud