2 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -verify %s
3 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -ast-dump-all %s | FileCheck %s
4 // expected-no-diagnostics
6 #pragma clang module build bounds_safety
7 module bounds_safety
{}
8 #pragma clang module contents
9 #pragma clang module begin bounds_safety
12 int fam
[] __attribute__((counted_by(count
)));
14 #pragma clang module end
15 #pragma clang module endbuild
17 #pragma clang module import bounds_safety
21 // CHECK: |-RecordDecl {{.*}}bounds_safety.map:4:1, line:7:1> line:4:8 imported in bounds_safety <undeserialized declarations> struct Test definition
22 // CHECK: | |-FieldDecl {{.*}} imported in bounds_safety referenced count 'int'
23 // CHECK: | `-FieldDecl {{.*}} imported in bounds_safety fam 'int[] __counted_by(count)':'int[]'
25 // CHECK: |-ImportDecl {{.*}}bounds-safety-attributed-type.c:17:22> col:22 implicit bounds_safety
26 // CHECK: |-RecordDecl {{.*}} struct Test
27 // CHECK: `-VarDecl {{.*}} p 'struct Test *'