[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / clang-tools-extra / test / clang-reorder-fields / ClassDerived.cpp
blobe7e9ac1c6db82a9a408615224afc3c2ee0ddb78e
1 // RUN: clang-reorder-fields -record-name bar::Derived -fields-order z,y %s -- | FileCheck %s
3 namespace bar {
4 class Base {
5 public:
6 Base(int nx, int np) : x(nx), p(np) {}
7 int x;
8 int p;
9 };
12 class Derived : public Base {
13 public:
14 Derived(long ny);
15 Derived(char nz);
16 private:
17 long y;
18 char z;
21 Derived::Derived(long ny) :
22 Base(ny, 0),
23 y(ny), // CHECK: {{^ z\(static_cast<char>\(ny\)\),}}
24 z(static_cast<char>(ny)) // CHECK-NEXT: {{^ y\(ny\)}}
27 Derived::Derived(char nz) :
28 Base(1, 2),
29 y(nz), // CHECK: {{^ z\(x\),}}
30 z(x) // CHECK-NEXT: {{^ y\(nz\)}}
33 } // namespace bar