Mercurial > hg > CbC > CbC_llvm
comparison clang/test/AST/atomic-expr.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 // Test without serialization: | |
1 // RUN: %clang_cc1 -ast-dump %s | FileCheck %s | 2 // RUN: %clang_cc1 -ast-dump %s | FileCheck %s |
3 // | |
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//" \ | |
8 // RUN: | FileCheck %s | |
2 | 9 |
3 template<int N = 0> | 10 template<int N = 0> |
4 void pr43370() { | 11 void pr43370() { |
5 int arr[2]; | 12 int arr[2]; |
6 __atomic_store_n(arr, 0, 5); | 13 __atomic_store_n(arr, 0, 5); |
15 void useage(){ | 22 void useage(){ |
16 pr43370(); | 23 pr43370(); |
17 foo(); | 24 foo(); |
18 } | 25 } |
19 | 26 |
20 // CHECK:FunctionTemplateDecl 0x{{[0-9a-f]+}} <{{[^,]+}}, line:7:1> line:4:6 pr43370 | 27 // CHECK:FunctionTemplateDecl 0x{{[0-9a-f]+}} <{{[^,]+}}, line:{{.*}}:1> line:{{.*}}:6 pr43370 |
21 // CHECK: AtomicExpr | 28 // CHECK: AtomicExpr |
22 // CHECK-NEXT: ImplicitCastExpr | 29 // CHECK-NEXT: ImplicitCastExpr |
23 // CHECK-SAME: <ArrayToPointerDecay> | 30 // CHECK-SAME: <ArrayToPointerDecay> |
24 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' | 31 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' |
25 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5 | 32 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5 |
26 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0 | 33 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0 |
27 // CHECK:FunctionDecl 0x{{[0-9a-f]+}} <line:4:1, line:7:1> line:4:6 used pr43370 | 34 // CHECK:FunctionDecl 0x{{[0-9a-f]+}} <line:{{.*}}:1, line:{{.*}}:1> line:{{.*}}:6 used pr43370 |
28 // CHECK: AtomicExpr | 35 // CHECK: AtomicExpr |
29 // CHECK-NEXT: ImplicitCastExpr | 36 // CHECK-NEXT: ImplicitCastExpr |
30 // CHECK-SAME: <ArrayToPointerDecay> | 37 // CHECK-SAME: <ArrayToPointerDecay> |
31 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' | 38 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' |
32 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5 | 39 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5 |
33 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0 | 40 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0 |
34 | 41 |
35 // CHECK:FunctionTemplateDecl 0x{{[0-9a-f]+}} <line:9:1, line:13:1> line:10:6 foo | 42 // CHECK:FunctionTemplateDecl 0x{{[0-9a-f]+}} <line:{{.*}}:1, line:{{.*}}:1> line:{{.*}}:6 foo |
36 // CHECK: AtomicExpr | 43 // CHECK: AtomicExpr |
37 // CHECK-NEXT: ImplicitCastExpr | 44 // CHECK-NEXT: ImplicitCastExpr |
38 // CHECK-SAME: <ArrayToPointerDecay> | 45 // CHECK-SAME: <ArrayToPointerDecay> |
39 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' | 46 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' |
40 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3 | 47 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3 |
43 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' | 50 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' |
44 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:56> 'int' 4 | 51 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:56> 'int' 4 |
45 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:47> 'int' 1 | 52 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:47> 'int' 1 |
46 // CHECK-NEXT: ImplicitCastExpr | 53 // CHECK-NEXT: ImplicitCastExpr |
47 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:50> 'int' 0 | 54 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:50> 'int' 0 |
48 // CHECK:FunctionDecl 0x{{[0-9a-f]+}} <line:10:1, line:13:1> line:10:6 used foo | 55 // CHECK:FunctionDecl 0x{{[0-9a-f]+}} <line:{{.*}}:1, line:{{.*}}:1> line:{{.*}}:6 used foo |
49 // CHECK: AtomicExpr | 56 // CHECK: AtomicExpr |
50 // CHECK-NEXT: ImplicitCastExpr | 57 // CHECK-NEXT: ImplicitCastExpr |
51 // CHECK-SAME: <ArrayToPointerDecay> | 58 // CHECK-SAME: <ArrayToPointerDecay> |
52 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' | 59 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]' |
53 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3 | 60 // CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3 |