diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-11-23 23:17:07 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-11-23 23:17:07 +0000 |
| commit | 03c4041cb517a709d0ef514731124690d2a485b8 (patch) | |
| tree | 7b1202850dfb3b17b12512098936752e701c3f86 /clang/lib | |
| parent | 0369c57ac6794c82ef3b35f2e6cae9e46debc4f7 (diff) | |
| download | bcm5719-llvm-03c4041cb517a709d0ef514731124690d2a485b8.tar.gz bcm5719-llvm-03c4041cb517a709d0ef514731124690d2a485b8.zip | |
make the 'to match this' diagnostic a note.
llvm-svn: 59921
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Lex/PPExpressions.cpp | 6 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseExprCXX.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/Parser.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp index 3eedf8cd98b..168c9d08adf 100644 --- a/clang/lib/Lex/PPExpressions.cpp +++ b/clang/lib/Lex/PPExpressions.cpp @@ -137,7 +137,7 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, if (LParenLoc.isValid()) { if (PeekTok.isNot(tok::r_paren)) { PP.Diag(PeekTok.getLocation(), diag::err_pp_missing_rparen); - PP.Diag(LParenLoc, diag::err_matching) << "("; + PP.Diag(LParenLoc, diag::note_matching) << "("; return true; } // Consume the ). @@ -261,7 +261,7 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, if (PeekTok.isNot(tok::r_paren)) { PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_rparen) << Result.getRange(); - PP.Diag(Start, diag::err_matching) << "("; + PP.Diag(Start, diag::note_matching) << "("; return true; } DT.State = DefinedTracker::Unknown; @@ -606,7 +606,7 @@ static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, if (PeekTok.isNot(tok::colon)) { PP.Diag(PeekTok.getLocation(), diag::err_expected_colon) << LHS.getRange(), RHS.getRange(); - PP.Diag(OpLoc, diag::err_matching) << "?"; + PP.Diag(OpLoc, diag::note_matching) << "?"; return true; } // Consume the :. diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 21b3dac038f..a379eeca2ee 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -271,7 +271,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, unsigned MinPrec) { if (Tok.isNot(tok::colon)) { Diag(Tok, diag::err_expected_colon); - Diag(OpToken, diag::err_matching) << "?"; + Diag(OpToken, diag::note_matching) << "?"; Actions.DeleteExpr(LHS.Val); Actions.DeleteExpr(TernaryMiddle.Val); return ExprResult(true); diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index 9eb2431642a..527aba20208 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -199,7 +199,7 @@ Parser::ExprResult Parser::ParseCXXCasts() { SourceLocation RAngleBracketLoc = Tok.getLocation(); if (ExpectAndConsume(tok::greater, diag::err_expected_greater)) - return Diag(LAngleBracketLoc, diag::err_matching) << "<"; + return Diag(LAngleBracketLoc, diag::note_matching) << "<"; SourceLocation LParenLoc = Tok.getLocation(), RParenLoc; diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index 221ad90273d..70062416fb3 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -733,7 +733,7 @@ Parser::StmtResult Parser::ParseDoStatement() { ExitScope(); if (!Body.isInvalid) { Diag(Tok, diag::err_expected_while); - Diag(DoLoc, diag::err_matching) << "do"; + Diag(DoLoc, diag::note_matching) << "do"; SkipUntil(tok::semi, false, true); } return true; diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index ae75266e041..4e27e718f87 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -71,7 +71,7 @@ SourceLocation Parser::MatchRHSPunctuation(tok::TokenKind RHSTok, case tok::greater: LHSName = "<"; DID = diag::err_expected_greater; break; } Diag(Tok, DID); - Diag(LHSLoc, diag::err_matching) << LHSName; + Diag(LHSLoc, diag::note_matching) << LHSName; SkipUntil(RHSTok); return R; } |

