1 // RUN: %clang_cc1 -std=c++14 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
3 template<typename T
= int>
5 return [](int p
= [] { return 0; } ()) { return p
; };
8 // CHECK: call noundef i32 @_ZZZ3ft1IiEDavENKUliE_clEiEd_NKUlvE_clEv
9 // CHECK: call noundef i32 @_ZZ3ft1IiEDavENKUliE_clEi
12 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZZ3ft1IiEDavENKUliE_clEi
13 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZZZ3ft1IiEDavENKUliE_clEiEd_NKUlvE_clEv
18 T
operator()(T p
= []{ return 0; }()) const { return p
; }
23 // CHECK: call noundef i32 @_ZZZ3ft2IiEDavENK1SclEiEd_NKUlvE_clEv
24 // CHECK: call noundef i32 @_ZZ3ft2IiEDavENK1SclEi
27 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZZ3ft2IiEDavENK1SclEi
28 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZZZ3ft2IiEDavENK1SclEiEd_NKUlvE_clEv
31 auto vt1
= [](int p
= [] { return 0; } ()) { return p
; };
33 // CHECK: call noundef i32 @_ZZNK3vt1IiEMUliE_clEiEd_NKUlvE_clEv
34 // CHECK: call noundef i32 @_ZNK3vt1IiEMUliE_clEi
37 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZNK3vt1IiEMUliE_clEi
38 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZZNK3vt1IiEMUliE_clEiEd_NKUlvE_clEv