xref: /llvm-project/clang/test/AST/ast-dump-late-parsing.cpp (revision 0140ba031c9b6a4028b36adb292fb37eb62f3dc0)
1 // RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -ast-dump %s \
2 // RUN: | FileCheck %s
3 
4 #pragma STDC FENV_ROUND FE_DOWNWARD
5 #pragma float_control(precise, off)
6 
7 template <typename T>
func_22(T x,T y)8 __attribute__((optnone)) T func_22(T x, T y) {
9   return x + y;
10 }
11 
12 // CHECK-LABEL: FunctionTemplateDecl {{.*}} func_22
13 // CHECK:         FunctionDecl {{.*}} func_22 'T (T, T)'
14 // CHECK:           CompoundStmt {{.*}} FPContractMode=1 ConstRoundingMode=downward MathErrno=1
15 // CHECK:             ReturnStmt
16 // CHECK:               BinaryOperator {{.*}} '+' FPContractMode=1 ConstRoundingMode=downward MathErrno=1
17 // CHECK:         FunctionDecl {{.*}} func_22 'float (float, float)'
18 // CHECK:           CompoundStmt {{.*}} FPContractMode=1 ConstRoundingMode=downward MathErrno=1
19 // CHECK:             ReturnStmt
20 // CHECK:               BinaryOperator {{.*}} 'float' '+' FPContractMode=1 ConstRoundingMode=downward MathErrno=1
21 
func_23(float x,float y)22 float func_23(float x, float y) {
23   return func_22(x, y);
24 }
25