diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-06-15 19:33:01 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-06-15 19:33:01 +0000 |
| commit | 78621e40766b8a3817c9f882b8783faba2e6c725 (patch) | |
| tree | 56b3a8347bd12bc5e358a603b63fd45a8f492494 /libcxxabi/test/catch_ptr.pass.cpp | |
| parent | 7005a9272b6ace3712b4268aaa33c776173551ab (diff) | |
| download | bcm5719-llvm-78621e40766b8a3817c9f882b8783faba2e6c725.tar.gz bcm5719-llvm-78621e40766b8a3817c9f882b8783faba2e6c725.zip | |
[libcxxabi] Reorder base class initializers in libc++abi tests to prevent -Wreorder
Summary:
This patch fixes -Wreorder warnings on test classes with virtual bases. Since the compiler is performing the reordering anyway this change *should* have NFC.
However the test notes that it is checking that "virtual base classes work properly". Since initialization order is clearly part of correctness I want to confirm that this wasn't an intentional mistake.
Reviewers: mclow.lists, howard.hinnant
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21396
llvm-svn: 272821
Diffstat (limited to 'libcxxabi/test/catch_ptr.pass.cpp')
| -rw-r--r-- | libcxxabi/test/catch_ptr.pass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxxabi/test/catch_ptr.pass.cpp b/libcxxabi/test/catch_ptr.pass.cpp index c7b63f9346f..db734f45f84 100644 --- a/libcxxabi/test/catch_ptr.pass.cpp +++ b/libcxxabi/test/catch_ptr.pass.cpp @@ -66,8 +66,8 @@ struct A { static int count; int id_; - explicit A(int id) : C1(id-1), C2(id-2), B(id+3), id_(id) {count++;} - A(const A& a) : C1(a.id_-1), C2(a.id_-2), B(a.id_+3), id_(a.id_) {count++;} + explicit A(int id) : B(id+3), C1(id-1), C2(id-2), id_(id) {count++;} + A(const A& a) : B(a.id_+3), C1(a.id_-1), C2(a.id_-2), id_(a.id_) {count++;} ~A() {count--;} }; |

