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
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index 4f6f117..ccaae6d 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -130,12 +130,12 @@
// 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 @@
// 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;
}