================
@@ -1022,7 +1040,10 @@ static void PrintPreprocessedTokens(Preprocessor &PP, 
Token &Tok,
     } else if (Tok.getLength() < std::size(Buffer)) {
       const char *TokPtr = Buffer;
       unsigned Len = PP.getSpelling(Tok, TokPtr);
-      Callbacks->OS->write(TokPtr, Len);
+      if (Tok.is(tok::comment))
----------------
AaronBallman wrote:

```suggestion
      if (Tok.is(tok::comment, tok::unknown))
```
I think unknown tokens can also have embedded newlines; code elsewhere is 
handling them. But this brings up a different question: are raw string literals 
with embedded CRLFs handled incorrectly too?

https://github.com/llvm/llvm-project/pull/205084
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to