summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
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
commit176057b5781e955fcfd908e90b20528292b50004 (patch)
treee989ea762967dfdb2724c3fabf00616aa5d46152 /clang/lib/Lex/PPDirectives.cpp
parente30f61cb368680c80d2a9729b1ab2832068a70f7 (diff)
downloadbcm5719-llvm-176057b5781e955fcfd908e90b20528292b50004.tar.gz
bcm5719-llvm-176057b5781e955fcfd908e90b20528292b50004.zip
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> llvm-svn: 175840
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 54457c36cfd..10446832124 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud