diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-18 07:59:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-18 07:59:24 +0000 |
commit | 3692b09faa9fe346f39bc922db6dce48cdcc3f63 (patch) | |
tree | 345b316a71a538b837efa50e3cdda96182386e0d /lib/Lex/Preprocessor.cpp | |
parent | ef708fd4abccf4d21b1f82ab2ab62f6ae7cc1265 (diff) |
Convert the lexer and start converting the PP over to using canonical Diag methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 3357791b6c..2fe84c96bc 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -118,10 +118,15 @@ Preprocessor::~Preprocessor() { /// Diag - Forwarding function for diagnostics. This emits a diagnostic at /// the specified Token's location, translating the token's start /// position in the current buffer into a SourcePosition object for rendering. -void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID) { - Diags.Report(getFullLoc(Loc), DiagID); +DiagnosticInfo Preprocessor::Diag(SourceLocation Loc, unsigned DiagID) { + return Diags.Report(getFullLoc(Loc), DiagID); } +DiagnosticInfo Preprocessor::Diag(const Token &Tok, unsigned DiagID) { + return Diags.Report(getFullLoc(Tok.getLocation()), DiagID); +} + + void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg) { Diags.Report(getFullLoc(Loc), DiagID) << Msg; |