So we have a collection of plugins, see here: https://cgit.freedesktop.org/libreoffice/core/tree/compilerp...
Which verify a variety of things.
We focus on 2 things: finding dodgy code and using APIs correctly. We don't try to modify the C++ language, just restrict accidentally straying into some of the really nasty corners.
But I like to keep an eye on experiments like yours for ideas :-)
e.g.
no c-style casts: https://cgit.freedesktop.org/libreoffice/core/tree/compilerp...
use the comma-operator sparingly: https://cgit.freedesktop.org/libreoffice/core/tree/compilerp...
is your loop variable really big enough: https://cgit.freedesktop.org/libreoffice/core/tree/compilerp...
calling virtual methods from destructors is dodgy: https://cgit.freedesktop.org/libreoffice/core/tree/compilerp...