Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang-tools-extra / test / clang-reorder-fields / ClassSimpleCtor.cpp
blob6dc27222a58b22acf001476c566e12e245894e3c
1 // RUN: clang-reorder-fields -record-name Foo -fields-order s1,x,z,s2 %s -- | FileCheck %s
3 class Foo {
4 public:
5 Foo();
7 private:
8 int x; // CHECK: {{^ const char \*s1;}}
9 const char *s1; // CHECK-NEXT: {{^ int x;}}
10 const char *s2; // CHECK-NEXT: {{^ double z;}}
11 double z; // CHECK-NEXT: {{^ const char \*s2;}}
14 Foo::Foo():
15 x(12), // CHECK: {{^ s1\("abc"\),}}
16 s1("abc"), // CHECK-NEXT: {{^ x\(12\),}}
17 s2("def"), // CHECK-NEXT: {{^ z\(3.14\),}}
18 z(3.14) // CHECK-NEXT: {{^ s2\("def"\)}}
21 int main() {
22 Foo foo;
23 return 0;