[PATCH] D67336: [analyzer][NFC] Introduce SuperChecker<>, a convenient alternative to Checker<> for storing subcheckers

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 18:56:00 PDT 2019


NoQ added a comment.

I have mixed feelings. Removing boilerplate is good, but the very fact that we're legalizing this pattern indicates that our checkers will keep bloating up, while i always wanted to actually split them instead (like, make sub-checkers into their own separate //classes//, possibly spread out into different files, kinda micro checkers as opposed to monolithic checkers (?)). But i guess it's about whoever gets things done first :)

I'd love to see how this affects our actual checkers, did you already try porting them? Do you plan to help with tracking per-sub-checker bug types and check names?

> `SuperChecker`

WDYT about `MultiChecker`? ("A checker that implements multiple checks and presents them as different checkers.")



================
Comment at: clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp:113
+void registerCXX23IntPointer(CheckerManager &Mgr) {
+  Mgr.registerSubChecker<CXX23Modeling, CXX23ModelingDiagKind::IntPointer>();
+}
----------------
The `CXX23ModelingDiagKind::` qualifier is unnecessary here, right? Or did you mean to make an `enum class`? Does it even work with `enum class`es?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67336/new/

https://reviews.llvm.org/D67336





More information about the cfe-commits mailing list