[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / template-64605.cpp
blob9d7f8d410017110f3e012016079ae49c202ef9b5
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -ast-dump -ast-dump-filter=b_64605 %s | FileCheck %s
3 // https://github.com/llvm/llvm-project/issues/64605
5 #pragma STDC FENV_ACCESS ON
6 template <typename>
7 int b_64605() {
8 int x;
9 if ((float)0xFFFFFFFF != (float)0x100000000) {
10 x = 1;
12 return x;
14 int f() { return b_64605<void>(); }
16 // CHECK: ImplicitCastExpr {{.*}} 'float' <IntegralToFloating> RoundingMath=1 AllowFEnvAccess=1
17 // CHECK-NEXT: IntegerLiteral {{.*}} 4294967295
19 // CHECK: FunctionDecl {{.*}} b_64605 'int ()'
20 // CHECK-NEXT: TemplateArgument type 'void'
22 // CHECK: ImplicitCastExpr {{.*}} 'float' <IntegralToFloating> RoundingMath=1 AllowFEnvAccess=1
23 // CHECK-NEXT: IntegerLiteral {{.*}} 4294967295