aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/trivial-constructor-init.cpp
blob: 65ed45e259c5486ecb08fe3d7d0c685cb6209fe5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 | FileCheck %s

extern "C" int printf(...);

struct S {
  S() { printf("S::S\n"); }
};

struct A {
  double x;
  A() : x(), y(), s() { printf("x = %f y = %x \n", x, y); }
  int *y;
  S s;
};

A a;

struct B {
  B() = default;
  B(const B&);
};

// CHECK-NOT: _ZL1b
static B b;

struct C {
  ~C();
};

// CHECK: _ZL1c
static C c[4];

int main() {
}