forked from OSchip/llvm-project
parent
a78a97e82f
commit
d7de629c32
|
@ -139,16 +139,6 @@ void Preprocessor::Diag(SourceLocation Loc, unsigned DiagID,
|
|||
|
||||
Diags.Report(Loc, DiagID, Msg);
|
||||
}
|
||||
void Preprocessor::Diag(const LexerToken &Tok, unsigned DiagID,
|
||||
const std::string &Msg) {
|
||||
// If we are in a '#if 0' block, don't emit any diagnostics for notes,
|
||||
// warnings or extensions.
|
||||
if (isSkipping() && Diagnostic::isNoteWarningOrExtension(DiagID))
|
||||
return;
|
||||
|
||||
Diag(Tok.getLocation(), DiagID, Msg);
|
||||
}
|
||||
|
||||
|
||||
void Preprocessor::DumpToken(const LexerToken &Tok, bool DumpFlags) const {
|
||||
std::cerr << tok::getTokenName(Tok.getKind()) << " '"
|
||||
|
|
|
@ -332,8 +332,10 @@ public:
|
|||
/// Diag - Forwarding function for diagnostics. This emits a diagnostic at
|
||||
/// the specified LexerToken's location, translating the token's start
|
||||
/// position in the current buffer into a SourcePosition object for rendering.
|
||||
void Diag(const LexerToken &Tok, unsigned DiagID, const std::string &Msg="");
|
||||
void Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg="");
|
||||
void Diag(const LexerToken &Tok, unsigned DiagID, const std::string &Msg="") {
|
||||
Diag(Tok.getLocation(), DiagID, Msg);
|
||||
}
|
||||
|
||||
/// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a
|
||||
/// token is the characters used to represent the token in the source file
|
||||
|
|
Loading…
Reference in New Issue