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
{
39 // <rdar://problem/9979458>
44 virtual void * getFoo() const = 0;
47 class Derived
: public Parent
{
50 void * getFoo() const;
53 class VeryDerived
: public Derived
{ // expected-warning{{'VeryDerived' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}
55 void * getFoo() const { return 0; }
65 template<typename T
> struct TemplVirt
{
69 template class TemplVirt
<float>;
71 template<> struct TemplVirt
<bool> {
75 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}}