[clang] [clang-tools-extra] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] fix(python): fix invalid escape sequences (PR #91856)

Zufu Liu via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 05:39:29 PDT 2024


zufuliu wrote:

> Why do we need to make this change?

https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences

> Changed in version 3.12: Unrecognized escape sequences produce a [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning). In a future Python version they will be eventually a [SyntaxError](https://docs.python.org/3/library/exceptions.html#SyntaxError).


doubling backlash inside regex string is poor than adding raw string prefix `r`.

https://github.com/llvm/llvm-project/pull/91856


More information about the llvm-commits mailing list