Mercurial > hg > CbC > CbC_llvm
view clang-tools-extra/test/clang-reorder-fields/ClassDerived.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
line wrap: on
line source
// RUN: clang-reorder-fields -record-name bar::Derived -fields-order z,y %s -- | FileCheck %s namespace bar { class Base { public: Base(int nx, int np) : x(nx), p(np) {} int x; int p; }; class Derived : public Base { public: Derived(long ny); Derived(char nz); private: long y; char z; }; Derived::Derived(long ny) : Base(ny, 0), y(ny), // CHECK: {{^ z\(static_cast<char>\(ny\)\),}} z(static_cast<char>(ny)) // CHECK-NEXT: {{^ y\(ny\)}} {} Derived::Derived(char nz) : Base(1, 2), y(nz), // CHECK: {{^ z\(x\),}} z(x) // CHECK-NEXT: {{^ y\(nz\)}} {} } // namespace bar