diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp index c42966928e52..ed2b8cdabd1c 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; diff --git a/clang/test/Preprocessor/stringize_space.c b/clang/test/Preprocessor/stringize_space.c index 2d79d478e39d..ae70bf18187c 100644 --- a/clang/test/Preprocessor/stringize_space.c +++ b/clang/test/Preprocessor/stringize_space.c @@ -12,3 +12,9 @@ c) // CHECK: {{^}}"a c"{{$}} +#define str(x) #x +#define f(x) str(-x) +f( + 1) + +// CHECK: {{^}}"-1"