aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-02-22 00:32:00 +0000
committerJordan Rose <jordan_rose@apple.com>2013-02-22 00:32:00 +0000
commitc7d1ca52ae1f33a105ad1be217304f74a34c45f3 (patch)
tree7df0ab4eb10768d90bdb638caefdd3056d5c4c93 /lib/Lex
parent025b3d4f528ce54242f414057cc45a65e39098db (diff)
Preproceessor: fix #if skipping under -traditional-cpp.
When parsing directives within skipped #if blocks, we don't want to retain any whitespace. Previously we were just skipping comments, but it's not possible to skip comments and retain other whitespace. This change matches the usual behavior for parsing directives (i.e. the behavior outside of skipped #if blocks). <rdar://problem/13267695> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r--lib/Lex/PPDirectives.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 54457c36cf..1044683212 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -258,7 +258,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
// directive mode. Tell the lexer this so any newlines we see will be
// converted into an EOD token (this terminates the macro).
CurPPLexer->ParsingPreprocessorDirective = true;
- if (CurLexer) CurLexer->SetCommentRetentionState(false);
+ if (CurLexer) CurLexer->SetKeepWhitespaceMode(false);
// Read the next token, the directive flavor.