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