diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-01-15 03:24:18 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-01-15 03:24:18 +0000 |
| commit | 4b83886ff13277e7e2556d3de5c36f5104ea1de0 (patch) | |
| tree | ae5e62cbebf4dc35f050c2770d03de419f377215 /clang/lib/Lex | |
| parent | 66e5db99b35f164ed039aa7e2caa79958484a619 (diff) | |
| download | bcm5719-llvm-4b83886ff13277e7e2556d3de5c36f5104ea1de0.tar.gz bcm5719-llvm-4b83886ff13277e7e2556d3de5c36f5104ea1de0.zip | |
When copying whitespace flags from the token naming a macro argument onto the
first token of the expansion, don't forget to copy the "is at the start of a
line" token (which is always false, as newlines cannot appear within a macro
body); otherwise, stringizing the result can insert spurious whitespace.
llvm-svn: 257863
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/TokenLexer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp index c42966928e5..ed2b8cdabd1 100644 --- a/clang/lib/Lex/TokenLexer.cpp +++ b/clang/lib/Lex/TokenLexer.cpp @@ -305,6 +305,7 @@ void TokenLexer::ExpandFunctionArguments() { // identifier. ResultToks[FirstResult].setFlagValue(Token::LeadingSpace, NextTokGetsSpace); + ResultToks[FirstResult].setFlagValue(Token::StartOfLine, false); NextTokGetsSpace = false; } continue; |

