// Helper functions.
//===----------------------------------------------------------------------===//
-bool Sema::Diag(SourceLocation Loc, unsigned DiagID) {
- PP.getDiagnostics().Report(PP.getFullLoc(Loc), DiagID);
- return true;
+DiagnosticInfo Sema::Diag(SourceLocation Loc, unsigned DiagID) {
+ return PP.getDiagnostics().Report(FullSourceLoc(Loc, PP.getSourceManager()),
+ DiagID);
}
bool Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg) {
const LangOptions &getLangOptions() const;
- /// The primitive diagnostic helpers - always returns true, which simplifies
- /// error handling (i.e. less code).
- bool Diag(SourceLocation Loc, unsigned DiagID);
+ /// The primitive diagnostic helpers.
+ DiagnosticInfo Diag(SourceLocation Loc, unsigned DiagID);
bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg);
bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg1,
const std::string &Msg2);