[clang] [analyzer] Prevent crash due to missing EventDispatch in corner case (PR #107294)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 08:23:38 PDT 2024


https://github.com/NagyDonat commented:

Hmm, I see that this assertion was hidden behind an `#ifndef NDEBUG` so it is only active within debug builds of the analyzer.

Nevertheless, I still think that it's better to remove it, because
1. it does not offer significant protection against introducing bugs (it's unlikely that somebody would develop an event handler without writing a corresponding event dispatcher);
2. it can cause trouble in test files where it's often good to enable a very minimal set of checkers.

https://github.com/llvm/llvm-project/pull/107294


More information about the cfe-commits mailing list