diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-15 15:39:40 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-15 15:39:40 +0000 |
| commit | ee791dde723a2089c681d2ab6a9d4f96379d5f49 (patch) | |
| tree | a6082d4d1d1e9ddaea09a6a04bb4a47da95d642d /test/CodeGenCXX/vtable-key-function.cpp | |
| parent | abe15e553e58165e7692c0d0842865c488ed7b45 (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/vtable-key-function.cpp')
| -rw-r--r-- | test/CodeGenCXX/vtable-key-function.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vtable-key-function.cpp b/test/CodeGenCXX/vtable-key-function.cpp index 90e8ea66f769..97a546f8c932 100644 --- a/test/CodeGenCXX/vtable-key-function.cpp +++ b/test/CodeGenCXX/vtable-key-function.cpp @@ -13,3 +13,21 @@ struct A { A::A() { } A::A(int) { } } + +// Make sure that we don't assert when building the vtable for a class +// template specialization or explicit instantiation with a key +// function. +template<typename T> +struct Base { + virtual ~Base(); +}; + +template<typename T> +struct Derived : public Base<T> { }; + +template<> +struct Derived<char> : public Base<char> { + virtual void anchor(); +}; + +void Derived<char>::anchor() { } |
