[PATCH] D81917: [clang-tidy] For `run-clang-tidy.py` escape the paths that are used for analysis.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 04:15:54 PDT 2020


njames93 added a comment.

In D81917#2127477 <https://reviews.llvm.org/D81917#2127477>, @Abpostelnicu wrote:

> @njames93 wdyt if we add another parameter to distinguish if we want to use regex or not, and if not we escape the paths?
>  Also thank you so much for catching this up!


As the argument is documented as being a regex string, we shouldn't really try to escape it, and users should be expected escape any file names themselves before invoking the script.
If for whatever reason you want to use `.c++` as your file extension. then you should pass `r'*\.c\+\+'` to the script.

Can I ask what the specific use case you have that is causing the issue? Are you invoking `run-clang-tidy` from a script that generates the list of files to search for?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81917/new/

https://reviews.llvm.org/D81917





More information about the cfe-commits mailing list