[clang] Treat escaped newlines as whitespace in Lexer::getRawToken. (PR #117548)
Samira Bazuzi via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 06:54:31 PST 2024
bazuzi wrote:
> > If an escaped newline should not be considered whitespace, then instead of this change, getRawToken should be modified to return true when whitespace follows the escaped newline present at Loc
>
> That sounds like a more promising approach. Is that something you would be willing to explore?
Certainly. Some initial testing reveals that getPreviousTokenAndStart is not in conflict with this approach as I had feared, because Lexer::GetBeginningOfToken will include an escaped newline immediately followed by non-whitespace as being part of the token.
I see no failing existing tests with just the new change to getRawToken, so I will update this PR to take that approach.
https://github.com/llvm/llvm-project/pull/117548
More information about the cfe-commits
mailing list