[cfe-dev] [analyzer] The use of tblgen in the analyzer

Kristóf Umann via cfe-dev cfe-dev at lists.llvm.org
Sun Oct 7 11:26:39 PDT 2018


I have two questions about this topic.

1. Checker registration:

I am in the process of updating clang-analyzer.llvm.org, and as I went
through the checkers that were missing, I encountered this:

def NonnullGlobalConstantsChecker: Checker<"NonnilStringConstants">,
  HelpText<"Assume that const string-like globals are non-null">,

What is particularly interesting here (other than the mismatched names), is
that NonilStringConstantsChecker.cpp doesn't exist, in fact it never did.
To my greatest surprise, DescFile isn't used anywhere!

registry.addChecker(register##CLASS, FULLNAME, HELPTEXT);

So, is there a point in keeping DescFile entries?

2. Use tblgen for AnalyzerOptions:

I dislike that I need to look at source code, or doxygen at best to know
what kind -analyzer-config options are available. Would it be a good idea
for me to refactor it with tblgen?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181007/de9fd9fe/attachment.html>

More information about the cfe-dev mailing list