summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index dc4dd877b67..3357791b6cb 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -124,28 +124,24 @@ void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID) {
void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
const std::string &Msg) {
- const std::string *Strs[] = { &Msg };
- Diags.Report(getFullLoc(Loc), DiagID, Strs, 1);
+ Diags.Report(getFullLoc(Loc), DiagID) << Msg;
}
void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
const std::string &Msg,
const SourceRange &R1, const SourceRange &R2) {
- const std::string *Strs[] = { &Msg };
- SourceRange R[] = {R1, R2};
- Diags.Report(getFullLoc(Loc), DiagID, Strs, 1, R, 2);
+ Diags.Report(getFullLoc(Loc), DiagID) << Msg << R1 << R2;
}
void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
const SourceRange &R) {
- Diags.Report(getFullLoc(Loc), DiagID, 0, 0, &R, 1);
+ Diags.Report(getFullLoc(Loc), DiagID) << R;
}
void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
const SourceRange &R1, const SourceRange &R2) {
- SourceRange R[] = {R1, R2};
- Diags.Report(getFullLoc(Loc), DiagID, 0, 0, R, 2);
+ Diags.Report(getFullLoc(Loc), DiagID) << R1 << R2;
}
OpenPOWER on IntegriCloud