[all-commits] [llvm/llvm-project] 0d8e16: [analyzer][NFC] Make CheckerDocumentation checker ...

Balazs Benics via All-commits all-commits at lists.llvm.org
Tue Mar 5 06:02:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d8e16a0967cfd2dbcd00c7bb7a56f476c0e64fb
      https://github.com/llvm/llvm-project/commit/0d8e16a0967cfd2dbcd00c7bb7a56f476c0e64fb
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp

  Log Message:
  -----------
  [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (#83973)

In PR #83677 I was surprised to see that outdated checker callback
signatures are a problem. It turns out, we need the `registerChecker...`
function to invoke the `Mgr.registerChecker<>()` which would instantiate
the `_register` calls, that would take the address of the defined
checker callbacks. Consequently, if the expected signatures mismatch, it
won't compile from now on, so we have static guarantee that this issue
never pops up again.

Given we need the `register` call, at this point we could just hook this
checker into the `debug` package and make it never registered. It
shouldn't hurt anyone :)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list