aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-12-06 00:02:41 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-12-06 00:02:41 +0000
commitec236787c5868eef53a807ca1a68b6b0b8c604c6 (patch)
tree8d6cf53ddef1627be5d6072cc55931c0747c6ecd /lib/Sema/SemaDeclObjC.cpp
parente9d11dbfe1f3286c5f8a2f2fc8ac759f63890655 (diff)
objc: put out more coherent warning when method definition
attributes don't match its declaration. // rdar://10529259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 49fcfbf2f3..afcf3cc63a 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/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);
}