diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-26 00:16:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-26 00:16:04 +0000 |
commit | 844cef32e4359c3e651e4eb84beca0c3e8a727d5 (patch) | |
tree | f337918ee6c7e361681017056b515c981d1e483d /lib/Parse/Parser.cpp | |
parent | 02a65146aaa1f209013415e9247771805ca2ad5d (diff) |
add a new diag helper that takes a range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 281459a300..ef07d3f08b 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -36,6 +36,12 @@ void Parser::Diag(SourceLocation Loc, unsigned DiagID, Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID, &Msg, 1); } +void Parser::Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R) { + Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID, 0, 0, + &R, 1); +} + + /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'), /// this helper function matches and consumes the specified RHS token if /// present. If not present, it emits the specified diagnostic indicating |