convert some more warnings to NOTEs.

llvm-svn: 59923
This commit is contained in:
Chris Lattner 2008-11-23 23:26:13 +00:00
parent d068503565
commit 12f7c5a36a
3 changed files with 12 additions and 12 deletions

View File

@ -42,6 +42,10 @@ DIAG(note_duplicate_case_prev, NOTE,
DIAG(note_matching, NOTE, DIAG(note_matching, NOTE,
"to match this '%0'") "to match this '%0'")
DIAG(note_using_decl, NOTE,
"using")
DIAG(note_also_found_decl, NOTE,
"also found")
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Lexer Diagnostics // Lexer Diagnostics
@ -486,10 +490,6 @@ DIAG(warn_incomplete_impl, WARNING,
"incomplete implementation") "incomplete implementation")
DIAG(warn_multiple_method_decl, WARNING, DIAG(warn_multiple_method_decl, WARNING,
"multiple methods named '%0' found") "multiple methods named '%0' found")
DIAG(warn_using_decl, WARNING,
"using")
DIAG(warn_also_found_decl, WARNING,
"also found")
DIAG(err_duplicate_method_decl, ERROR, DIAG(err_duplicate_method_decl, ERROR,
"duplicate declaration of method '%0'") "duplicate declaration of method '%0'")
DIAG(err_undeclared_protocol, ERROR, DIAG(err_undeclared_protocol, ERROR,

View File

@ -825,10 +825,10 @@ ObjCMethodDecl *Sema::LookupInstanceMethodInGlobalPool(Selector Sel,
} }
if (issueWarning && (MethList.Method && MethList.Next)) { if (issueWarning && (MethList.Method && MethList.Next)) {
Diag(R.getBegin(), diag::warn_multiple_method_decl) << Sel.getName() << R; Diag(R.getBegin(), diag::warn_multiple_method_decl) << Sel.getName() << R;
Diag(MethList.Method->getLocStart(), diag::warn_using_decl) Diag(MethList.Method->getLocStart(), diag::note_using_decl)
<< MethList.Method->getSourceRange(); << MethList.Method->getSourceRange();
for (ObjCMethodList *Next = MethList.Next; Next; Next = Next->Next) for (ObjCMethodList *Next = MethList.Next; Next; Next = Next->Next)
Diag(Next->Method->getLocStart(), diag::warn_also_found_decl) Diag(Next->Method->getLocStart(), diag::note_also_found_decl)
<< Next->Method->getSourceRange(); << Next->Method->getSourceRange();
} }
return MethList.Method; return MethList.Method;

View File

@ -7,21 +7,21 @@ typedef struct { int x; } Alternate;
#define INTERFERE_TYPE Alternate* #define INTERFERE_TYPE Alternate*
@protocol A @protocol A
@property Abstract *x; // expected-warning{{using}} @property Abstract *x; // expected-note {{using}}
@end @end
@interface B @interface B
@property Abstract *y; // expected-warning{{using}} @property Abstract *y; // expected-note {{using}}
@end @end
@interface B (Category) @interface B (Category)
@property Abstract *z; // expected-warning{{using}} @property Abstract *z; // expected-note {{using}}
@end @end
@interface InterferencePre @interface InterferencePre
-(void) x; // expected-warning{{also found}} -(void) x; // expected-note {{also found}}
-(void) y; // expected-warning{{also found}} -(void) y; // expected-note {{also found}}
-(void) z; // expected-warning{{also found}} -(void) z; // expected-note {{also found}}
-(void) setX: (INTERFERE_TYPE) arg; -(void) setX: (INTERFERE_TYPE) arg;
-(void) setY: (INTERFERE_TYPE) arg; -(void) setY: (INTERFERE_TYPE) arg;
-(void) setZ: (INTERFERE_TYPE) arg; -(void) setZ: (INTERFERE_TYPE) arg;