forked from OSchip/llvm-project
fix a minor bug I noticed while work with Jordy's patch for PR6101,
in an input file like this: # 42 int x; we were emitting: # <something> int x; (with a space before the int) because we weren't clearing the leading whitespace flag properly after the \n from the directive was handled. llvm-svn: 101084
This commit is contained in:
parent
11862a6ed3
commit
1a9e873bf9
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue