[all-commits] [llvm/llvm-project] f7e8be: Skip escaped newlines before checking for whitespa...

Samira Bazuzi via All-commits all-commits at lists.llvm.org
Thu Dec 5 06:38:09 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f7e8be7c66b53a126c8cba9ac81b5b77d873aa1e
      https://github.com/llvm/llvm-project/commit/f7e8be7c66b53a126c8cba9ac81b5b77d873aa1e
  Author: Samira Bazuzi <bazuzi at google.com>
  Date:   2024-12-05 (Thu, 05 Dec 2024)

  Changed paths:
    M clang/lib/Lex/Lexer.cpp
    M clang/unittests/Lex/LexerTest.cpp

  Log Message:
  -----------
  Skip escaped newlines before checking for whitespace in Lexer::getRawToken. (#117548)

The Lexer used in getRawToken is not told to keep whitespace, so when it
skips over escaped newlines, it also ignores whitespace, regardless of
getRawToken's IgnoreWhiteSpace parameter. 

Instead of letting this case fall through to lexing, check
for whitespace after skipping over any escaped newlines.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list