diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-24 12:51:04 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-24 12:51:04 +0000 |
| commit | 26da1f46e4c892d3705a12fb7667637e4af4259a (patch) | |
| tree | e6242a8e211e1ba508f114e4a14605f8177474a3 /clang/lib/Parse/Parser.cpp | |
| parent | 404cd15fa5bbdc43c1cb69d072685b83cf873fd2 (diff) | |
| download | bcm5719-llvm-26da1f46e4c892d3705a12fb7667637e4af4259a.tar.gz bcm5719-llvm-26da1f46e4c892d3705a12fb7667637e4af4259a.zip | |
Add a Parser::Diag overload that can receive a custom string along with a SourceRange.
llvm-svn: 55283
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
| -rw-r--r-- | clang/lib/Parse/Parser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index a5fe551bfec..c6b0a80e02e 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -38,6 +38,12 @@ bool Parser::Diag(SourceLocation Loc, unsigned DiagID, return true; } +bool Parser::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg, + SourceRange Range) { + Diags.Report(PP.getFullLoc(Loc), DiagID, &Msg, 1, &Range,1); + return true; +} + bool Parser::Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R) { Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID, 0, 0, &R, 1); |

