aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/test/clang-reorder-fields/PreprocessorDirectiveAroundDefinition.cpp
blob: f00b4b0b57bf7c4536733e66160bd2d6f8048573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order y,x %s -- | FileCheck %s

namespace bar {

#define DEFINE_FOO

// This is okay to reorder.
#ifdef DEFINE_FOO
struct Foo {
  int x;     // CHECK:      {{^ int y;}}
  int y;     // CHECK-NEXT: {{^ int x;}}
};
#endif

} // end namespace bar