[PATCH] D73521: [analyzer] add-new-checker.py: Introduction

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 12:31:58 PDT 2020


Charusso marked an inline comment as done.
Charusso added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:24
 def CoreBuiltin : Package<"builtin">, ParentPackage<Core>, Hidden;
-def CoreUninitialized  : Package<"uninitialized">, ParentPackage<Core>;
+def CoreUninitialized : Package<"uninitialized">, ParentPackage<Core>;
 def CoreAlpha : Package<"core">, ParentPackage<Alpha>;
----------------
The script is allergic to human issues. The followup will be to normalize the necessary files.


================
Comment at: clang/utils/analyzer/add-new-checker.py:79-81
+        data = subprocess.check_output(['llvm-tblgen', '-dump-json',
+                                        checkers_path,
+                                        '-I=' + checkers_include_path])
----------------
NoQ wrote:
> `llvm-tblgen` needs to be in the `PATH`, right? What if LLVM isn't installed on the host system or has the wrong version?
> 
> We might have to either tell the user to specify it explicitly in the invocation (and then update the LIT substitution to explicitly use the right binary), or, ideally, try to get the script installed into the build directory so that it could find the freshly built `llvm-tblgen` binary relative to itself.
Hm, I am not a magician, so my assumption one has the llvm/clang therefore the llvm-tblgen available. If not, it warns you and you need to specify. May if you want to make sure it "just works" please adjust it later.


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

https://reviews.llvm.org/D73521





More information about the cfe-commits mailing list