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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits