[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 11 05:31:27 PDT 2024
https://github.com/NagyDonat commented:
Seems to be a good change overall and I like that you implemented this with some nice helper classes. However, there is some code duplication that could be reduced (see inline comments).
Also, I feel that (especially after these extensions) this checker duplicates some logic that also appears in `PthreadLockChecker.cpp`. I didn't check the exact details but that checker is also modeling the locking and unlocking calls in order to report bad locking/unlocking order.
In theory it would be to ensure that we don't develop and maintain two similar but different solutions that both track lock handling code -- but PthreadLockChecker is 700 lines long and I understand that it would be difficult to unify it with this checker.
https://github.com/llvm/llvm-project/pull/80029
More information about the cfe-commits
mailing list