[cfe-commits] r38639 - in /cfe/cfe/trunk: Lex/Preprocessor.cpp include/clang/Lex/Preprocessor.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:23:25 PDT 2007
Author: sabre
Date: Wed Jul 11 11:23:25 2007
New Revision: 38639
URL: http://llvm.org/viewvc/llvm-project?rev=38639&view=rev
Log:
Move a method inline
Modified:
cfe/cfe/trunk/Lex/Preprocessor.cpp
cfe/cfe/trunk/include/clang/Lex/Preprocessor.h
Modified: cfe/cfe/trunk/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Lex/Preprocessor.cpp?rev=38639&r1=38638&r2=38639&view=diff
==============================================================================
--- cfe/cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/cfe/trunk/Lex/Preprocessor.cpp Wed Jul 11 11:23:25 2007
@@ -139,16 +139,6 @@
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()) << " '"
Modified: cfe/cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=38639&r1=38638&r2=38639&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/Preprocessor.h Wed Jul 11 11:23:25 2007
@@ -332,8 +332,10 @@
/// 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
More information about the cfe-commits
mailing list