[PATCH] D90535: [clang-tidy] Allow -warnings-as-errors to be specified from run_clang_tidy.py

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 31 16:27:25 PDT 2020


njames93 added a comment.

Just a general drive by comment, there have been quite a few patches recently that add arguments that just get forwarded straight to clang-tidy, would it not be a whole lot simpler if we could just automatically forward arguments straight to clang-tidy.
clang-tidy itself uses the `--` argument to signify any arguments after that get forwarded to the clang driver, this script could probably do the same.
The whole invocation could be like this:
`py run_clang_tidy.py <tool_args> -- <clang_tidy_options> -- <options_forwarded_to_clang>`
So a general use case could look like this:
`py run_clang_tidy.py -p ./compile_commands.json -quiet -- -check=-*,bugprone* -warnings-as-errors=* -- -UNDEBUG`

Anyway aside from that, please upload diffs with the full context, see https://llvm.org/docs/Phabricator.html#phabricator-request-review-web for more info.



================
Comment at: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py:242
+                      help='Upgrades warnings to errors. Does not enable '
+                      'any warnings py itself.')
   args = parser.parse_args()
----------------
s/py/by


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90535



More information about the cfe-commits mailing list