[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 10:25:41 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py:113
+  file_path_help = ("Path to Checkers.td, defaults to ../../../../clang/include/clang/StaticAnalyzer/Checkers/")
+  parse.add_argument("file", type=str, help=file_path_help, nargs='?', default='../../../../clang/include/clang/StaticAnalyzer/Checkers/')
+  args = parse.parse_args()
----------------
I'm not super enthusiastic about this approach because the default is known to be wrong for supported ways of building Clang. It does give us some way forward, but getting the default wrong for some number of our developers is unfortunate.

Why not test the path you list there (which should be good for monorepo) and if that isn't found, test `../../../../../include/clang/StaticAnalyzer/Checkers/` (which should be good for in-tree builds)? This way the arguments only need to be supplied if you have a truly odd directory layout that we can't otherwise guess at.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64454





More information about the cfe-commits mailing list