forked from OSchip/llvm-project
objc QOI: Don't't warn about mismatch between attributes
on method declaration and definition if former is in a system header. // rdar://10580333 llvm-svn: 147020
This commit is contained in:
parent
91c052c4d8
commit
13d08955ea
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue