1 // Test without serialization:
2 // RUN: %clang_cc1 %s -ast-dump | FileCheck %s
4 // Test with serialization:
5 // RUN: %clang_cc1 -emit-pch -o %t %s
6 // RUN: %clang_cc1 -x c++ -include-pch %t -ast-dump-all /dev/null \
7 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
10 // Veryify the ordering of the address_space attribute still comes before the
11 // type whereas other attributes are still printed after.
15 // CHECK: VarDecl {{.*}} x '__attribute__((address_space(1))) int *'
16 __attribute__((address_space(1))) int *x
;
18 // CHECK: VarDecl {{.*}} a 'int * __attribute__((noderef))'
19 int __attribute__((noderef
)) * a
;
21 // CHECK: VarDecl {{.*}} y '__attribute__((address_space(2))) int *'
22 __attribute__((address_space(I
))) int *y
;
24 // CHECK: VarDecl {{.*}} z '__attribute__((address_space(3))) int *'
25 [[clang::address_space(3)]] int *z
;