[PATCH] D84316: [analyzer][NFC] Split CStringChecker to modeling and reporting
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 21:02:13 PDT 2020
NoQ added a comment.
In D84316#2168730 <https://reviews.llvm.org/D84316#2168730>, @steakhal wrote:
> I wanted to have a separate class for bookkeeping while minimalizing the necessary changes.
> What do you think would be the best way to organize this separation?
>
> Few notes:
>
> - Checkers are implemented in the anonymous namespace, so only the given file has access to them.
> - I wanted to separate the bookkeeping logic from the reporting/function modeling logic in different files.
> - I like the fact that after the change the CStringChecker implements only the evalCall checker callback.
>
> Let me know if I misunderstood something.
Mmm, none of these benefits sound like they outweigh confusing the cost of users with a new checker flag that can't even be used in any sensible way.
If you want separate files, just put the checker into a header and include it from multiple cpp files. A few checkers already do that - RetainCountChecker, MPIChecker, UninitializedObjectChecker. There's nothing fundamental about keeping checkers in an anonymous namespace.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84316/new/
https://reviews.llvm.org/D84316
More information about the cfe-commits
mailing list