https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107531
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Unsurprisingly, -fanalyzer doesn't say anything useful about this, because it doesn't support C++. PR 94355 tracks some of that (and the meta-bug that it blocks tracks more).