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
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 281459a..ef07d3f 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -36,6 +36,12 @@
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