1 // Tests without serialization:
2 // RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu %s \
3 // RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK1
5 // RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -DFAST -mreassociate %s \
6 // RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK1
8 // RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -DFAST -mreassociate %s \
9 // RUN: -fprotect-parens \
10 // RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK2
12 // Tests with serialization:
13 // RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -emit-pch -o %t %s
14 // RUN: %clang_cc1 -triple i386-pc-linux-gnu -include-pch %t -ast-dump-all /dev/null \
15 // RUN: | FileCheck %s --strict-whitespace
17 // RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -DFAST -mreassociate %s \
18 // RUN: -emit-pch -o %t
19 // RUN: %clang_cc1 -triple i386-pc-linux-gnu -include-pch %t -ast-dump-all /dev/null \
20 // RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK1
22 // RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -DFAST -mreassociate %s \
23 // RUN: -fprotect-parens \
24 // RUN: -emit-pch -o %t
25 // RUN: %clang_cc1 -triple i386-pc-linux-gnu -include-pch %t -ast-dump-all /dev/null -fprotect-parens\
26 // RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK2
30 int addit(float a
, float b
) {
32 v
= __arithmetic_fence(a
+ b
);
38 //CHECK:| `-CompoundStmt {{.*}}
39 //CHECK-NEXT:| |-BinaryOperator {{.*}} 'int' '='
40 //CHECK-NEXT:| | |-DeclRefExpr {{.*}} 'int' lvalue Var {{.*}} 'v' 'int'
41 //CHECK-NEXT:| | `-ImplicitCastExpr {{.*}}
42 //CHECK-NEXT:| | `-CallExpr {{.*}} 'float'
43 //CHECK-NEXT:| | |-ImplicitCastExpr {{.*}}
44 //CHECK-NEXT:| | | `-DeclRefExpr {{.*}}' Function {{.*}} '__arithmetic_fence'{{.*}}
45 //CHECK1-NOT:| | | `-DeclRefExpr {{.*}}' Function{{.*}} '__arithmetic_fence' 'void ()'
46 //CHECK2:| | | `-DeclRefExpr {{.*}} Function{{.*}} '__arithmetic_fence' 'void ()'