[analyzer] Dump checker name if multiple checkers evaluate the same call
authorBalazs Benics <balazs.benics@sigmatechnology.se>
Tue, 2 Nov 2021 13:42:14 +0000 (14:42 +0100)
committerBalazs Benics <balazs.benics@sigmatechnology.se>
Tue, 2 Nov 2021 13:42:14 +0000 (14:42 +0100)
commit9b5c9c469d90227251d9da9108ee7985ba415f2b
treef4cbb7cbabf13654a81499d946f5f538681f6d0d
parent6a5e08cc4a5c64de08a277dd2e0a862120c5fc28
[analyzer] Dump checker name if multiple checkers evaluate the same call

Previously, if accidentally multiple checkers `eval::Call`-ed the same
`CallEvent`, in debug builds the analyzer detected this and crashed
with the message stating this. Unfortunately, the message did not state
the offending checkers violating this invariant.
This revision addresses this by printing a more descriptive message
before aborting.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D112889
clang/lib/StaticAnalyzer/Core/CallEvent.cpp
clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
clang/unittests/StaticAnalyzer/CMakeLists.txt
clang/unittests/StaticAnalyzer/ConflictingEvalCallsTest.cpp [new file with mode: 0644]