[PATCH] D102322: [clang-tidy] Add '-target' CLI option to override target triple

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 12 05:08:10 PDT 2021


njames93 added a comment.

This change doesn't seem to accomplish anything. We can already set the target via the compile command.
This can be done in the compilation database directly or by using the `extra-arg` and `extra-arg-before` command line arguments.
If you're not using a compilation database, then you can pass the compile command to clang-tidy after an empty `--` argument.

For the test case, this is sufficient to fix the issue:

  // RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-vararg %t -- --extra-arg=--target=x86_64-windows


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

https://reviews.llvm.org/D102322



More information about the cfe-commits mailing list