diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-18 07:50:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-18 07:50:21 +0000 |
commit | ef708fd4abccf4d21b1f82ab2ab62f6ae7cc1265 (patch) | |
tree | 37e17902a9dc0656c78649d1c409dd46c7fa3203 /lib/Parse/ParseTentative.cpp | |
parent | 1ab3b96de160e4fbffec2a776e284a48a3bb543d (diff) |
remove the last couple obsolete forms of Parser::Diag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 4f6f117f2a..ccaae6d3b2 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -130,12 +130,12 @@ bool Parser::isCXXSimpleDeclaration() { // We have a declaration that looks like a functional cast; there's a high // chance that the author intended the statement to be an expression. // Emit a warning. - Diag(Tok.getLocation(), diag::warn_statement_disambiguation, - "declaration", SourceRange(Tok.getLocation(), TentativeParseLoc)); + Diag(Tok, diag::warn_statement_disambiguation) + << "declaration" << SourceRange(Tok.getLocation(), TentativeParseLoc); } else if (TPR == TPResult::False() && Tok.is(tok::kw_void)) { // A functional cast to 'void' expression ? Warning.. - Diag(Tok.getLocation(), diag::warn_statement_disambiguation, - "expression", SourceRange(Tok.getLocation(), TentativeParseLoc)); + Diag(Tok, diag::warn_statement_disambiguation) + << "expression" << SourceRange(Tok.getLocation(), TentativeParseLoc); } return TPR == TPResult::True(); @@ -750,8 +750,8 @@ bool Parser::isCXXFunctionDeclarator(bool warnIfAmbiguous) { // Function declarator has precedence over constructor-style initializer. // Emit a warning just in case the author intended a variable definition. if (warnIfAmbiguous) - Diag(Tok.getLocation(), diag::warn_parens_disambiguated_as_function_decl, - SourceRange(Tok.getLocation(), TPLoc)); + Diag(Tok, diag::warn_parens_disambiguated_as_function_decl) + << SourceRange(Tok.getLocation(), TPLoc); return true; } |