Make test more lenient for custom clang version strings
[llvm-project.git] / clang-tools-extra / test / clang-reorder-fields / ClassMixedInitialization.cpp
blob888649a91205306403da9be6bf442553a753cda3
1 // RUN: clang-reorder-fields -record-name Foo -fields-order e,x,pi,s2,s1 %s -- -std=c++11 | FileCheck %s
3 class Foo {
4 public:
5 Foo();
7 private:
8 int x; // CHECK: {{^ double e = 2.71;}}
9 const char *s1; // CHECK-NEXT: {{^ int x;}}
10 const char *s2; // CHECK-NEXT: {{^ double pi = 3.14;}}
11 double pi = 3.14; // CHECK-NEXT: {{^ const char \*s2;}}
12 double e = 2.71; // CHECK-NEXT: {{^ const char \*s1;}}
15 Foo::Foo():
16 x(12), // CHECK: {{^ x\(12\)}},
17 s1("abc"), // CHECK-NEXT: {{^ s2\("def"\)}},
18 s2("def") // CHECK-NEXT: {{^ s1\("abc"\)}}
21 int main() {
22 Foo foo;
23 return 0;