================ @@ -190,23 +203,38 @@ class CheckerManager { // Checker registration. //===--------------------------------------------------------------------===// - /// Used to register checkers. - /// All arguments are automatically passed through to the checker - /// constructor. + /// Construct the singleton instance of a checker, register it for the + /// supported callbacks and record its name with `registerCheckerPart()`. + /// Arguments passed to this function are forwarded to the constructor of the + /// checker. + /// + /// If `CHECKER` has multiple parts, then the constructor call and the + /// callback registration only happen within the first `registerChecker()` + /// call; while the subsequent calls only enable additional parts of the + /// existing checker object (while registering their names). /// /// \returns a pointer to the checker object. - template <typename CHECKER, typename... AT> - CHECKER *registerChecker(AT &&... Args) { + template <typename CHECKER, CheckerPartIdx Idx = DefaultPart, typename... AT> + CHECKER *registerChecker(AT &&...Args) { + // This assert could be removed but then need to make sure that calls that + // register different parts of the same checker pass the same arguments. ---------------- NagyDonat wrote:
```suggestion // This assert could be removed but then we need to make sure that calls // registering different parts of the same checker pass the same arguments. ``` https://github.com/llvm/llvm-project/pull/130985 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits