diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-06-05 13:49:11 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-06-05 13:49:11 +0000 |
commit | 70b5d8406e5e4aef822c1c29149d8f3c06a28cb5 (patch) | |
tree | f765be87f35a9b9b7d5c1f45efc499135ffa1472 /clang/test | |
parent | 0e9892fe3af490fc7e8f4b852f4aee92e45827c9 (diff) | |
download | bcm5719-llvm-70b5d8406e5e4aef822c1c29149d8f3c06a28cb5.tar.gz bcm5719-llvm-70b5d8406e5e4aef822c1c29149d8f3c06a28cb5.zip |
Add a test for the breakage from r183298
llvm-svn: 183308
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/vtable-layout.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/vtable-layout.cpp b/clang/test/CodeGenCXX/vtable-layout.cpp index 7bbade4b048..474bf2b57f3 100644 --- a/clang/test/CodeGenCXX/vtable-layout.cpp +++ b/clang/test/CodeGenCXX/vtable-layout.cpp @@ -1889,3 +1889,37 @@ namespace Test39 { void B::foo2() { } } + +namespace Test40 { + struct A { + virtual void foo() = 0; + }; + + struct B : public A { + virtual void foo(); + }; + + struct C: public B { + // CHECK-46: VTable indices for 'Test40::C' (8 entries). + // CHECK-46-NEXT: 1 | int Test40::C::f(int) + // CHECK-46-NEXT: 2 | int Test40::C::f() + // CHECK-46-NEXT: 3 | int Test40::C::g(int) + // CHECK-46-NEXT: 4 | int Test40::C::g() + // CHECK-46-NEXT: 5 | int Test40::C::h(int) + // CHECK-46-NEXT: 6 | int Test40::C::h() + // CHECK-46-NEXT: 7 | int Test40::C::i(int) + // CHECK-46-NEXT: 8 | int Test40::C::i() + virtual int f(int); + virtual int f(); + virtual int g(int); + virtual int g(); + virtual int h(int); + virtual int h(); + virtual int i(int); + virtual int i(); + }; + + class D : C {}; + + D d; +} |