<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72853>72853</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [17.x backport] fix python SyntaxWarnings (invalid escape sequence) in check-all output
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          eleftg
      </td>
    </tr>
</table>

<pre>
    Such as:

```
src_dir/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py:28: SyntaxWarning: invalid escape sequence '\*'    self.implementationContent += """
src_dir/llvm/utils/lit/lit/TestRunner.py:205: SyntaxWarning: invalid escape sequence '\c' """
src_dir/llvm/utils/lit/lit/TestRunner.py:1561: SyntaxWarning: invalid escape sequence '\s'                     match = _caching_re_compile("^\s*%else\s*(%{)?").search(ln)
src_dir/libcxx/utils/libcxx/test/format.py:64: SyntaxWarning: invalid escape sequence '\s'                     for output in re.split('[$]\s*":"\s*"RUN: at line \d+"', fullOutput):
src_dir/libcxx/utils/libcxx/test/params.py:121: SyntaxWarning: invalid escape sequence '\+' AddSubstitution("%{cxx_std}", re.sub("\+", "x", std)),
src_dir/libcxx/utils/libcxx/test/params.py:214: SyntaxWarning: invalid escape sequence '\+' AddFeature("stdlib=libc++") if re.match(".+-libc\+\+", stdlib) else None,
src_dir/compiler-rt/test/lit.common.cfg.py:800: SyntaxWarning: invalid escape sequence '\$'                    "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
src_dir/compiler-rt/test/lit.common.cfg.py:809: SyntaxWarning: invalid escape sequence '\$' "-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
src_dir/compiler-rt/test/lit.common.cfg.py:817: SyntaxWarning: invalid escape sequence '\$'                    "-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
src_dir/llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out)
```

Converting to raw strings addresses the issue.

Thanks a lot @ldionne for pointing me to the right direction, on properly re-submitting this pull request.

cc: @petrhosek 

/branch eleftg/llvm-project/python_SyntaxWarnings_backport_17
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0ll9v4ygQwD8NeUGx7HFc2w95SJ3LaaXTrtTtaR8jjCc2Vww-wN3kPv0J7DRNr_uw2V5koYBgmN_8Y5i1olWIa5Ldk2y7YKPrtFmjxINrF7VuTuuvI-8osyTdkHhL4vN4F89fmFrD940wBHZcMtUS2ElRE9g9ai1FmG_HfvAzArsWFRrmcM-Px70_KTW30XAi6QYKkm7o15Ny7PiNGeXPphsq1DOToqFoORuQWvx7RMWREshJVhHYEMgppdSiPESiHyT2qBxzQqtKK4fKUQL3JN1SAjB_b_SW8rknsBudkDao717GR7TuYVQKzaxknN2gJfc6fsT1SXaX3HC_nW30n1_PHO-oN86eM94J1e4N7rnuByGRQOG1zX6bJGwIZCgtvswKAhnJ7wmUJN0FtDKyyAzvCBRS-fW3pKLmx-MV67zg0HregzY9cxPr3eojSQ_aUD26YXRUKGowskMwcRHO3RNYkWz7ggY-5D37ef7w52d_OXNUCoWUZFXjo8pD5wQqehil_BLEB3Nsfpp8YIb1cyYkcIuTgz453TTN17G2TrjR58DsxOCpkHOuIfk2LFXBDGN99nN1Jqp8rB7nv_4AlOGrfokKklsceqHaIXOjmaPSusZXmXTrbwx7JtVLKg4eKwT2tDUicL8M2yZprzlnMVBSH9n0s1b4DuacD2Zp3AVNChdx3fdaRfzQTohFHN-EuPpB1BKA5TdJoFr-Q6DSRrRC0XnFDMx1Xtkg4MvDp98_fabLPwhkj3QpCWTH5qRYL7gU9V6xHu2A_J3q8xNw5e1wF5Jb9fZVnA7auoM4_pKPkvx_8tHDByPN78JrljME5Lc8Q41HuJR8n_3nck0ADEpk1u8tXspbS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