summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2010-12-22 08:23:18 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2010-12-22 08:23:18 +0000
commitea4f7c776194c96f8ece1456bc22102c6cbc9a33 (patch)
treed1053edb8868105b02ca8fdf61a21462e03a8501 /clang/lib/Lex/PPDirectives.cpp
parentfe86bc527a0d50b653d2df8fa8b091a5397d3a9d (diff)
downloadbcm5719-llvm-ea4f7c776194c96f8ece1456bc22102c6cbc9a33.tar.gz
bcm5719-llvm-ea4f7c776194c96f8ece1456bc22102c6cbc9a33.zip
Introduced raw_identifier token kind.
llvm-svn: 122394
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 467d4858883..5b65fd3034b 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -245,7 +245,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
// If this isn't an identifier directive (e.g. is "# 1\n" or "#\n", or
// something bogus), skip it.
- if (Tok.isNot(tok::identifier)) {
+ if (Tok.isNot(tok::raw_identifier)) {
CurPPLexer->ParsingPreprocessorDirective = false;
// Restore comment saving mode.
if (CurLexer) CurLexer->SetCommentRetentionState(KeepComments);
@@ -257,12 +257,8 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
// to spell an i/e in a strange way that is another letter. Skipping this
// allows us to avoid looking up the identifier info for #define/#undef and
// other common directives.
- bool Invalid = false;
- const char *RawCharData = SourceMgr.getCharacterData(Tok.getLocation(),
- &Invalid);
- if (Invalid)
- return;
-
+ const char *RawCharData = Tok.getRawIdentifierData();
+
char FirstChar = RawCharData[0];
if (FirstChar >= 'a' && FirstChar <= 'z' &&
FirstChar != 'i' && FirstChar != 'e') {
OpenPOWER on IntegriCloud