1 // RUN: %clang_cc1 -verify -std=c++11 %s
2 // expected-no-diagnostics
3 template <typename T
> struct OwnPtr
{
6 static_assert(sizeof(T
) > 0, "incomplete T");
11 namespace use_vtable_for_vcall
{
20 virtual void m2() { static_cast<A
*>(this)->m(); }
21 OwnPtr
<Incomplete
> m_sqlError
;
25 // Since B's constructor is declared out of line, nothing in this file
26 // references a vtable, so the destructor doesn't get built.
33 namespace dont_mark_qualified_vcall
{
41 // Previously we would mark B's vtable referenced to devirtualize this call to
42 // A::m, even though it's not a virtual call.
43 virtual void m() { A::m(); }
44 OwnPtr
<Incomplete
> m_sqlError
;