[PATCH] D84316: [analyzer][NFC] Split CStringChecker to modeling and reporting
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 10:58:44 PDT 2020
Szelethus added a comment.
You could do it in the code, but if the modeling wouldn't be present from CStringModeling, CStringChecker wouldn't work properly. So you should make it a strong dependency, just as you did in this patch. My comment was mainly a response to @NoQ :)
================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringLength.cpp:175-181
+void ento::registerCStringModeling(CheckerManager &Mgr) {
+ Mgr.registerChecker<CStringModeling>();
+}
+
+bool ento::shouldRegisterCStringModeling(const CheckerManager &) {
+ return true;
+}
----------------
steakhal wrote:
> Szelethus wrote:
> > We traditionally put these on the bottom of the file -- I don't think this would upset the structure too much :)
> I wanted to place the class definition as close as possible to the registration function.
> I can move this though.
Yeah, I see what you were going for, but I'd prefer to keep it down there still.
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