Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK
      2 // RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix MS
      3 // CHECK-NOT: _ZN1CC1ERK1C
      4 // CHECK-NOT: _ZN1SC1ERK1S
      5 // MS-NOT: ?0C@@QAE@ABV0
      6 // MS-NOT: ?0S@@QAE@ABV0
      7 
      8 extern "C" int printf(...);
      9 
     10 
     11 struct C {
     12   C() : iC(6) {printf("C()\n"); }
     13   C(const C& c) { printf("C(const C& c)\n"); }
     14   int iC;
     15 };
     16 
     17 C foo() {
     18   return C();
     19 };
     20 
     21 class X { // ...
     22 public:
     23   X(int) {}
     24   X(const X&, int i = 1, int j = 2, C c = foo()) {
     25     printf("X(const X&, %d, %d, %d)\n", i, j, c.iC);
     26   }
     27 };
     28 
     29 
     30 struct S {
     31   S();
     32 };
     33 
     34 S::S() { printf("S()\n"); }
     35 
     36 void Call(S) {};
     37 
     38 int main() {
     39   X a(1);
     40   X b(a, 2);
     41   X c = b;
     42   X d(a, 5, 6);
     43   S s;
     44   Call(s);
     45 }
     46