Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / trivial-constructor-init.cpp
blobda17799dfa4254e7c8490e50dd9f4cc670e5eaed
1 // RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 -triple %itanium_abi_triple | FileCheck %s
3 extern "C" int printf(...);
5 struct S {
6 S() { printf("S::S\n"); }
7 };
9 struct A {
10 double x;
11 A() : x(), y(), s() { printf("x = %f y = %x \n", x, y); }
12 int *y;
13 S s;
16 A a;
18 struct B {
19 B() = default;
20 B(const B&);
23 // CHECK-NOT: _ZL1b
24 static B b;
26 struct C {
27 ~C();
30 // CHECK: _ZL1c
31 static C c[4];
33 int main() {
36 namespace PR22793 {
37 template <typename>
38 struct foo {
39 protected:
40 // CHECK-NOT: _ZN7PR227933fooIiED2Ev
41 ~foo() = default;
42 friend void func();
45 void func() { foo<int> f; }
47 template struct foo<int>;