aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/test/clang-reorder-fields/FieldAnnotationsInMacros.cpp
blob: aedec9556aa55a42fe68262613bc073616cf1106 (plain)
1
2
3
4
5
6
7
8
9
// RUN: clang-reorder-fields -record-name Foo -fields-order y,x %s -- | FileCheck %s

#define GUARDED_BY(x) __attribute__((guarded_by(x)))

class Foo {
  int x GUARDED_BY(x); // CHECK: {{^  int y;}}
  int y;               // CHECK-NEXT: {{^  int x GUARDED_BY\(x\);}}
};