void Diag(SourceLocation Loc, unsigned DiagID,
const std::string &Msg = std::string());
+ void Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R);
void Diag(const Token &Tok, unsigned DiagID,
const std::string &M = std::string()) {
Diag(Tok.getLocation(), DiagID, M);
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