xref: /minix3/external/bsd/llvm/dist/clang/test/Index/attributes.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source all %s | FileCheck %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc struct __attribute__((packed)) Test2 {
4f4a2713aSLionel Sambuc   char a;
5f4a2713aSLionel Sambuc };
6f4a2713aSLionel Sambuc 
7*0a6a1f1dSLionel Sambuc void pure_fn() __attribute__((pure));
8*0a6a1f1dSLionel Sambuc void const_fn() __attribute__((const));
9*0a6a1f1dSLionel Sambuc void noduplicate_fn() __attribute__((noduplicate));
10*0a6a1f1dSLionel Sambuc 
11f4a2713aSLionel Sambuc // CHECK: attributes.c:3:32: StructDecl=Test2:3:32 (Definition) Extent=[3:1 - 5:2]
12f4a2713aSLionel Sambuc // CHECK: attributes.c:3:23: attribute(packed)=packed Extent=[3:23 - 3:29]
13f4a2713aSLionel Sambuc // CHECK: attributes.c:4:8: FieldDecl=a:4:8 (Definition) Extent=[4:3 - 4:9] [access=public]
14f4a2713aSLionel Sambuc 
15*0a6a1f1dSLionel Sambuc // CHECK: attributes.c:7:6: FunctionDecl=pure_fn:7:6 Extent=[7:1 - 7:37]
16*0a6a1f1dSLionel Sambuc // CHECK: attributes.c:7:31: attribute(pure)= Extent=[7:31 - 7:35]
17*0a6a1f1dSLionel Sambuc // CHECK: attributes.c:8:6: FunctionDecl=const_fn:8:6 Extent=[8:1 - 8:39]
18*0a6a1f1dSLionel Sambuc // CHECK: attributes.c:8:32: attribute(const)= Extent=[8:32 - 8:37]
19*0a6a1f1dSLionel Sambuc // CHECK: attributes.c:9:6: FunctionDecl=noduplicate_fn:9:6 Extent=[9:1 - 9:51]
20*0a6a1f1dSLionel Sambuc // CHECK: attributes.c:9:38: attribute(noduplicate)= Extent=[9:38 - 9:49]
21