refs #10765/#11262 - Token: introduced cache for `isMutableExpression()` calls by firewave · Pull Request #8145 · cppcheck-opensource/cppcheck
This also gets rid of the Clang-only hack I introduced a while ago.
Using the code from https://trac.cppcheck.net/ticket/10765#comment:4:
Clang 21 - 2,713,071,190 -> 2,616,154,402
GCC 15 - 2,918,649,065 -> 2,718,303,437
Running it on https://github.com/firewave/mame_regtest/blob/master/mame_regtest.c :
Clang 21 - 20,959,594,045-> 20,008,068,513
GCC 15 - 22,603,210,883 -> 20,663,260,243
There is newly introduced overhead in Token::isMutableExpr() (about 2% of Ir).