1 // RUN: %clang_cc1 -ast-dump -triple bpf-pc-linux-gnu %s | FileCheck %s
3 // The 'preserve_static_offset' attribute should be propagated to
4 // inline declarations (foo's 'b', 'bb', 'c' but not 'd').
6 // CHECK: RecordDecl {{.*}} struct foo definition
7 // CHECK-NEXT: BPFPreserveStaticOffsetAttr
8 // CHECK-NEXT: FieldDecl {{.*}} a
9 // CHECK-NEXT: RecordDecl {{.*}} struct definition
10 // CHECK-NEXT: FieldDecl {{.*}} aa
11 // CHECK-NEXT: FieldDecl {{.*}} b
12 // CHECK-NEXT: RecordDecl {{.*}} union bar definition
13 // CHECK-NEXT: BPFPreserveStaticOffsetAttr
14 // CHECK-NEXT: FieldDecl {{.*}} a
15 // CHECK-NEXT: FieldDecl {{.*}} b
22 } __attribute__((preserve_static_offset
));
27 } __attribute__((preserve_static_offset
));