[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 12:01:14 PDT 2019


aaron.ballman added a comment.

When I run the script locally, I still get issues with `subprocess.run()`.

  c:\llvm\tools\clang\tools\extra\docs\clang-tidy\checks>python gen-static-analyzer-docs.py
  Traceback (most recent call last):
    File "gen-static-analyzer-docs.py", line 148, in <module>
      main()
    File "gen-static-analyzer-docs.py", line 137, in main
      checkers = get_checkers(file_path)
    File "gen-static-analyzer-docs.py", line 22, in get_checkers
      result = subprocess.run(["llvm-tblgen", "--dump-json", "-I",
  AttributeError: 'module' object has no attribute 'run'



================
Comment at: clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py:120-123
+  if(os.path.exists(default_path_in_tree)):
+    default_path = default_path_in_tree
+  if(os.path.exists(default_path_monorepo)):
+    default_path = default_path_monorepo
----------------
Swap the order of these and use an `elif` so we don't set the path and then overwrite it?


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