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

Argyrios Kyrtzidis via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 12 15:45:15 PDT 2018

> On Oct 7, 2018, at 11:26 AM, Kristóf Umann via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> Hi!
> I have two questions about this topic.
> 1. Checker registration:
> I am in the process of updating clang-analyzer.llvm.org <http://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">,
>   DescFile<"NonilStringConstantsChecker.cpp">;
> 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?

Just to give some context for ‘DescFile', the intention of this was to point to a file that we could use to add detailed documentation for a checker with a specific format, think of something like extensive doxygen documentation, and a tool would be able to extract such detailed documentation from the source files and render them in another format, like html pages for clang-analyzer.llvm.org <http://clang-analyzer.llvm.org/>.

However, this never materialized and it’s useless now.

> 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?
> Cheers,
> Kristóf
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

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

More information about the cfe-dev mailing list