[libcxx-commits] [clang] [libcxx] [llvm] Add unnecessary-virtual-specifier to -Wextra (PR #138741)
Devon Loehr via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 7 06:53:39 PDT 2025
DKLoehr wrote:
Looks like all the libc++ checks passed, so we should be good.
> Alternatively, we could ‘fix’ our codebase instead by introducing an LLVM_VIRTUAL_ANCHOR macro or sth like that which disables the diagnostic for that one declaration.
This seems like a good way to do it, since it clearly documents what's going on. LLVM is the only project I've seen with such a policy; across all of chromium's dependencies, the extra `virtual` specifiers we flagged were indeed mistakes. The issue with libc++ was more to do with infrastructure than the warning itself, IIUC.
https://github.com/llvm/llvm-project/pull/138741
More information about the libcxx-commits
mailing list