[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 06:45:06 PDT 2017


xazax.hun added a comment.

In https://reviews.llvm.org/D37437#909537, @zaks.anna wrote:

> Just to be clear, since this leads to regression to the checker API, I am asking to look into other ways of solving this problem. For example, is there a way to ensure that the checker names are set at construction?


Checkers are instantiated here: https://github.com/llvm-mirror/clang/blob/master/include/clang/StaticAnalyzer/Core/CheckerManager.h#L142
Checkers are created using the default constructor. After the constructor was run we set the name. If we want the checkers to be able to create the BugType with the correct name in the constructor (and not using mutable fields for the BugTypes), we need to add a new constructor parameter to CheckerBase and all the Checkers will need to forward a CheckerName to their base classes. So we need to break the API for every checkers basically. But if you prefer that solution I can rewrite this patch.


https://reviews.llvm.org/D37437





More information about the cfe-commits mailing list