diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-21 00:09:11 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-21 00:09:11 +0000 |
commit | 28441e6cee11fe6c2b3e13980f81203d14e73202 (patch) | |
tree | 102036433c440b43a278e271679566c7004e4407 /lib/Sema/SemaDeclObjC.cpp | |
parent | a44854a23b3f090729d82f447aa88df4f6563263 (diff) |
objc QOI: Don't't warn about mismatch between attributes
on method declaration and definition if former is in
a system header. // rdar://10580333
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 4f87db426d..c86f735d57 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -2737,8 +2737,11 @@ Decl *Sema::ActOnMethodDeclaration( ObjCMethod->isInstanceMethod()); if (ObjCMethod->hasAttrs() && containsInvalidMethodImplAttribute(IMD, ObjCMethod->getAttrs())) { - Diag(EndLoc, diag::warn_attribute_method_def); - Diag(IMD->getLocation(), diag::note_method_declared_at); + SourceLocation MethodLoc = IMD->getLocation(); + if (!getSourceManager().isInSystemHeader(MethodLoc)) { + Diag(EndLoc, diag::warn_attribute_method_def); + Diag(MethodLoc, diag::note_method_declared_at); + } } } else { cast<DeclContext>(ClassDecl)->addDecl(ObjCMethod); |