diff options
| author | Mike Stump <mrs@apple.com> | 2009-11-03 19:03:17 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-11-03 19:03:17 +0000 |
| commit | 9c21289a866b677d21ed3d5ecfdfd5ced5a55410 (patch) | |
| tree | bc452034c6620454cb00a26fe362245ebfd6842c /test/CodeGenCXX/virt.cpp | |
| parent | dc998c1b90a17d747ca2fb05e967779740747162 (diff) | |
| download | clang-9c21289a866b677d21ed3d5ecfdfd5ced5a55410.tar.gz clang-9c21289a866b677d21ed3d5ecfdfd5ced5a55410.tar.bz2 clang-9c21289a866b677d21ed3d5ecfdfd5ced5a55410.tar.xz | |
Refine codegen for covariant thunks that return references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/virt.cpp')
| -rw-r--r-- | test/CodeGenCXX/virt.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/CodeGenCXX/virt.cpp b/test/CodeGenCXX/virt.cpp index e0067d6c12..4607e6a19a 100644 --- a/test/CodeGenCXX/virt.cpp +++ b/test/CodeGenCXX/virt.cpp @@ -1113,6 +1113,38 @@ class test17_D : public test17_B2 { // CHECK-LP64-NEXT: .quad __ZN9test17_B13barEv +struct test18_NV1 { + virtual void fooNV1() { } +virtual void foo_NV1() { } + int i; +}; + +struct test18_NV2 { + virtual test18_NV2& foo1() { return *this; } +virtual void foo_NV2() { } +virtual void foo_NV2b() { } + int i; +}; + +struct test18_B : public test18_NV1, test18_NV2 { + virtual test18_B& foo1() { return *this; } + virtual test18_B *foo2() { return 0; } + virtual test18_B *foo3() { return 0; } +virtual void foo_B() { } + int i; +}; + +struct test18_B2 : test18_NV1, virtual test18_B { + virtual test18_B2& foo1() { return *this; } + virtual test18_B2 *foo2() { return 0; } +virtual void foo_B2() { } + int i; +}; + +struct test18_D : test18_NV1, virtual test18_B2 { + virtual test18_D& foo1() { return *this; } +} d; + // CHECK-LP64: __ZTV1B: // CHECK-LP64-NEXT: .space 8 |
