1 // RUN: %clang_cc1 -std=c++2a -triple x86_64-elf-gnu %s -emit-llvm -o - | FileCheck %s
3 consteval
int immediate() { return 0;}
5 void f(int a
= immediate() + ext());
10 // CHECK: call noundef i32 @_ZL3extv()
12 // CHECK: call {{.*}} @_Z1fi
13 // CHECK: call {{.*}} @_Z1fi
16 // CHECK: define {{.*}} i32 @_ZL3extv()
18 static constexpr int not_immediate();
20 int a
= immediate() + not_immediate();
24 // CHECK: call void @_ZN1AC2Ev
26 // CHECK-NOT: call void @_ZN1AC2Ev
30 // CHECK: define {{.*}} void @_ZN1AC2Ev{{.*}}
31 // CHECK: %call = call noundef i32 @_ZL13not_immediatev()
33 int never_referenced() {return 42;};
39 int a
= immediate() + never_referenced();
41 void f(int a
= immediate() + never_referenced());
50 static int ext() {return 0;}
51 static constexpr int not_immediate() {return 0;}
53 // CHECK-NOT: define {{.*}} i32 _ZL16never_referencedv()(
54 // CHECK: define {{.*}} i32 @_ZL13not_immediatev()