// Test without serialization:
// RUN: %clang_cc1 -fsyntax-only -triple x86_64-pc-linux -std=c++11 -ast-dump %s \
// RUN: | FileCheck --strict-whitespace %s
// Test with serialization:
// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-pch -o %t %s
// RUN: %clang_cc1 -x c++ -triple x86_64-pc-linux -include-pch %t -ast-dump-all /dev/null \
// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
// RUN: | FileCheck --strict-whitespace %s
float ;
T
float
// CHECK: FunctionTemplateDecl {{.*}} func_02
// CHECK: FunctionDecl {{.*}} func_02 'float (float)'
// CHECK-NEXT: TemplateArgument type 'float'
// CHECK-NEXT: BuiltinType {{.*}} 'float'
// CHECK-NEXT: ParmVarDecl {{.*}} x 'float'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: CallExpr {{.*}} FPContractMode=1
// CHECK: FunctionDecl {{.*}} func_03 'float (float)'
// CHECK-NEXT: ParmVarDecl {{.*}} x 'float'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: CallExpr {{.*}} FPContractMode=0
int
// CHECK: FunctionDecl {{.*}} func_04 'int (float)'
// CHECK-NEXT: ParmVarDecl {{.*}} x 'float'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' <FloatingToIntegral> FPContractMode=1
float
// CHECK: FunctionDecl {{.*}} func_05 'float (double)'
// CHECK-NEXT: ParmVarDecl {{.*}} x 'double'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: CStyleCastExpr {{.*}} FPContractMode=1
float
// CHECK: FunctionDecl {{.*}} func_06 'float (double)'
// CHECK-NEXT: ParmVarDecl {{.*}} x 'double'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: CXXFunctionalCastExpr {{.*}} FPContractMode=1
float
// CHECK: FunctionDecl {{.*}} func_07 'float (double)'
// CHECK-NEXT: ParmVarDecl {{.*}} x 'double'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: CXXStaticCastExpr {{.*}} FPContractMode=1
float
// CHECK-LABEL: FunctionDecl {{.*}} func_10 'float (float, float)'
// CHECK: BinaryOperator {{.*}} 'float' '+' ConstRoundingMode=downward
float
// CHECK-LABEL: FunctionDecl {{.*}} func_11 'float (float, float)'
// CHECK: BinaryOperator {{.*}} 'float' '+' ConstRoundingMode=upward
// CHECK: BinaryOperator {{.*}} 'float' '-' ConstRoundingMode=downward
float
// CHECK-LABEL: FunctionDecl {{.*}} func_12 'float (float, float)'
// CHECK: BinaryOperator {{.*}} 'float' '+' ConstRoundingMode=dynamic
float
// CHECK-LABEL: FunctionDecl {{.*}} func_13 'float (float, float)'
// CHECK: BinaryOperator {{.*}} 'float' '+' ConstRoundingMode=tonearest
T
float
// CHECK-LABEL: FunctionTemplateDecl {{.*}} func_14
// CHECK: FunctionDecl {{.*}} func_14 'T (T, T)'
// CHECK: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: BinaryOperator {{.*}} '+' ConstRoundingMode=towardzero
// CHECK: FunctionDecl {{.*}} func_14 'float (float, float)'
// CHECK: CompoundStmt
// CHECK-NEXT: ReturnStmt
// CHECK-NEXT: BinaryOperator {{.*}} 'float' '+' ConstRoundingMode=towardzero
float
// CHECK-LABEL: FunctionDecl {{.*}} func_16 'float (float, float)'
// CHECK: CompoundStmt {{.*}} ConstRoundingMode=towardzero
// CHECK: IfStmt
// CHECK: CompoundStmt {{.*}} ConstRoundingMode=upward
// CHECK: ReturnStmt
// CHECK: BinaryOperator {{.*}} ConstRoundingMode=upward
// CHECK: ReturnStmt
// CHECK: BinaryOperator {{.*}} ConstRoundingMode=towardzero
float
// CHECK-LABEL: FunctionDecl {{.*}} func_17 'float (float, float)'
// CHECK: CompoundStmt {{.*}} ConstRoundingMode=towardzero
// CHECK: IfStmt
// CHECK: CompoundStmt {{.*}}
// CHECK: ReturnStmt
// CHECK: BinaryOperator {{.*}} ConstRoundingMode=towardzero
// CHECK: ReturnStmt
// CHECK: BinaryOperator {{.*}} ConstRoundingMode=towardzero
float
// CHECK-LABEL: FunctionDecl {{.*}} func_18 'float (float, float)'
// CHECK: CompoundStmt {{.*}} ConstRoundingMode=downward
// CHECK: ReturnStmt
// CHECK: BinaryOperator {{.*}} ConstRoundingMode=downward