1 // RUN: %clang_cc1 %s -fsyntax-only -verify -triple %itanium_abi_triple -Wweak-vtables
3 // Check that this warning is disabled on MS ABI targets which don't have key
5 // RUN: %clang_cc1 %s -fsyntax-only -triple %ms_abi_triple -Werror -Wweak-vtables
7 // -Wweak-template-vtables is deprecated but we still parse it.
8 // RUN: %clang_cc1 %s -fsyntax-only -Werror -Wweak-template-vtables
10 struct A
{ // expected-warning {{'A' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}
14 template<typename T
> struct B
{
43 virtual void * getFoo() const = 0;
46 class Derived
: public Parent
{
49 void * getFoo() const;
52 class VeryDerived
: public Derived
{ // expected-warning{{'VeryDerived' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}
54 void * getFoo() const { return 0; }
64 template<typename T
> struct TemplVirt
{
68 template class TemplVirt
<float>;
70 template<> struct TemplVirt
<bool> {
74 template<> struct TemplVirt
<long> { // expected-warning{{'TemplVirt<long>' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}