[clang] [Clang][Sema] Don't warn on accessing virtual base from abstract class (PR #217715)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 10:14:17 PDT 2026


https://github.com/efriedma-quic approved this pull request.

LGTM

----

> Can you explain why we don't have the same issue if the base class (C2 in the reproducer in the issue) is not abstract?

The warning only makes sense if it's possible some code could call the complete object constructor.  If the class is abstract, that can't happen.  (The warning could still be a false positive if the complete object constructor is actually called anywhere, but that's hard to check.)

https://github.com/llvm/llvm-project/pull/217715


More information about the cfe-commits mailing list