xref: /llvm-project/clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
2 // PR7851
3 struct string {
4   string (const string& );
5   string ();
6   ~string();
7 };
8 
9 string operator + (char ch, const string&);
10 
11 template <class T>
IntToString(T a)12 void IntToString(T a)
13 {
14  string result;
15  T digit;
16  char((digit < 10 ? '0' : 'a') + digit) + result;
17 }
18 
main()19 int main() {
20 // CHECK-LABEL: define linkonce_odr {{.*}}void @_Z11IntToStringIcEvT_(
21   IntToString('a');
22 }
23 
24