forked from OSchip/llvm-project
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
This commit is contained in:
parent
66e5db99b3
commit
4b83886ff1
|
@ -305,6 +305,7 @@ void TokenLexer::ExpandFunctionArguments() {
|
|||
// identifier.
|
||||
ResultToks[FirstResult].setFlagValue(Token::LeadingSpace,
|
||||
NextTokGetsSpace);
|
||||
ResultToks[FirstResult].setFlagValue(Token::StartOfLine, false);
|
||||
NextTokGetsSpace = false;
|
||||
}
|
||||
continue;
|
||||
|
|
|
@ -12,3 +12,9 @@ c)
|
|||
|
||||
// CHECK: {{^}}"a c"{{$}}
|
||||
|
||||
#define str(x) #x
|
||||
#define f(x) str(-x)
|
||||
f(
|
||||
1)
|
||||
|
||||
// CHECK: {{^}}"-1"
|
||||
|
|
Loading…
Reference in New Issue