summaryrefslogtreecommitdiffstats
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 19f25ea..74e8d74 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -1874,9 +1874,10 @@ LexNextToken:
if (PP->isCurrentLexer(this)) {
// Start a new token. If this is a #include or something, the PP may
// want us starting at the beginning of the line again. If so, set
- // the StartOfLine flag.
+ // the StartOfLine flag and clear LeadingSpace.
if (IsAtStartOfLine) {
Result.setFlag(Token::StartOfLine);
+ Result.clearFlag(Token::LeadingSpace);
IsAtStartOfLine = false;
}
goto LexNextToken; // GCC isn't tail call eliminating.
@@ -2024,9 +2025,10 @@ LexNextToken:
if (PP->isCurrentLexer(this)) {
// Start a new token. If this is a #include or something, the PP may
// want us starting at the beginning of the line again. If so, set
- // the StartOfLine flag.
+ // the StartOfLine flag and clear LeadingSpace.
if (IsAtStartOfLine) {
Result.setFlag(Token::StartOfLine);
+ Result.clearFlag(Token::LeadingSpace);
IsAtStartOfLine = false;
}
goto LexNextToken; // GCC isn't tail call eliminating.
OpenPOWER on IntegriCloud