summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-18 07:50:21 +0000
committerChris Lattner <sabre@nondot.org>2008-11-18 07:50:21 +0000
commit3d31c6c823ba2edfd4e3fdd512807a1ba7612a5b (patch)
treefe47974f27bc52d899b3c405a1c5728020db0a4a /clang/lib/Parse/ParseTentative.cpp
parent6d29c10564b3635449d0e01f53791e22488081ef (diff)
downloadbcm5719-llvm-3d31c6c823ba2edfd4e3fdd512807a1ba7612a5b.tar.gz
bcm5719-llvm-3d31c6c823ba2edfd4e3fdd512807a1ba7612a5b.zip
remove the last couple obsolete forms of Parser::Diag.
llvm-svn: 59510
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r--clang/lib/Parse/ParseTentative.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index 4f6f117f2a9..ccaae6d3b25 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud