jyknight wrote:
LLVM's intentional usage is either to reduce redundant vtable emission via
ensuring there is a key method, OR, to intentionally create a useless vtable,
in order to reduce redundant debuginfo emission (it can be emitted only in the
vtable's TU when there's a vtable.) I expect both are likely to be rather
unusual.
I'd say it's highly likely that _most_ code where this diagnostic triggers is
simply because "virtual" was added to a function which simply doesn't need it,
and the solution is to remove "virtual". This diagnostic can definitely be
useful -- it likely indicates an issue in the code. I just don't think the
issue it identifies is _that important_ as to warrant being on by default, such
that we'd emit this even on a project with has not enabled any warning flags.
E.g. as comparison, is this really more important than `-Wall` diagnostics like
"-Wdelete-non-virtual-dtor" ("warning: delete called on non-final <Foo> that
has virtual functions but non-virtual destructor"), for example? I'd say
definitely not.
https://github.com/llvm/llvm-project/pull/133265
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits