From 1326a3dcbbf04b126396d3e1a739ee437ca4398c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Nov 2008 23:26:13 +0000 Subject: [PATCH] convert some more warnings to NOTEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticKinds.def | 8 ++++---- lib/Sema/SemaDeclObjC.cpp | 4 ++-- test/SemaObjC/method-lookup-3.m | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def index f1024c36e6..13894aef86 100644 --- a/include/clang/Basic/DiagnosticKinds.def +++ b/include/clang/Basic/DiagnosticKinds.def @@ -42,6 +42,10 @@ DIAG(note_duplicate_case_prev, NOTE, DIAG(note_matching, NOTE, "to match this '%0'") +DIAG(note_using_decl, NOTE, + "using") +DIAG(note_also_found_decl, NOTE, + "also found") //===----------------------------------------------------------------------===// // Lexer Diagnostics @@ -486,10 +490,6 @@ DIAG(warn_incomplete_impl, WARNING, "incomplete implementation") DIAG(warn_multiple_method_decl, WARNING, "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, "duplicate declaration of method '%0'") DIAG(err_undeclared_protocol, ERROR, diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 0b4ebabb9a..cc54e890cf 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -825,10 +825,10 @@ ObjCMethodDecl *Sema::LookupInstanceMethodInGlobalPool(Selector Sel, } if (issueWarning && (MethList.Method && MethList.Next)) { 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(); 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(); } return MethList.Method; diff --git a/test/SemaObjC/method-lookup-3.m b/test/SemaObjC/method-lookup-3.m index 25299ca6d3..28c2e1a308 100644 --- a/test/SemaObjC/method-lookup-3.m +++ b/test/SemaObjC/method-lookup-3.m @@ -7,21 +7,21 @@ typedef struct { int x; } Alternate; #define INTERFERE_TYPE Alternate* @protocol A -@property Abstract *x; // expected-warning{{using}} +@property Abstract *x; // expected-note {{using}} @end @interface B -@property Abstract *y; // expected-warning{{using}} +@property Abstract *y; // expected-note {{using}} @end @interface B (Category) -@property Abstract *z; // expected-warning{{using}} +@property Abstract *z; // expected-note {{using}} @end @interface InterferencePre --(void) x; // expected-warning{{also found}} --(void) y; // expected-warning{{also found}} --(void) z; // expected-warning{{also found}} +-(void) x; // expected-note {{also found}} +-(void) y; // expected-note {{also found}} +-(void) z; // expected-note {{also found}} -(void) setX: (INTERFERE_TYPE) arg; -(void) setY: (INTERFERE_TYPE) arg; -(void) setZ: (INTERFERE_TYPE) arg; -- 2.40.0