1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
2 // RUN: FileCheck %s
3 // RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
4 // RUN: FileCheck %s
5 
6 extern "C" int printf(...);
7 
8 
9 struct C {
CC10   C() : iC(6) {}
11   int iC;
12 };
13 
foo()14 int foo() {
15   return 6;
16 };
17 
18 class X { // ...
19 public:
X(int)20   X(int) {}
X(const X &,int i=1,int j=2,int k=foo ())21   X(const X&, int i = 1, int j = 2, int k = foo()) {
22     printf("X(const X&, %d, %d, %d)\n", i, j, k);
23   }
24 };
25 
main()26 int main() {
27   X a(1);
28   X b(a, 2);
29   X c = b;
30   X d(a, 5, 6);
31 }
32 
33 // CHECK: call void @_ZN1XC1ERKS_iii
34 // CHECK: call void @_ZN1XC1ERKS_iii
35 // CHECK: call void @_ZN1XC1ERKS_iii
36