brintos

brintos / llvm-project-archived public Read only

0
0
Text · 630 B · da17799 Raw
49 lines · cpp
1// RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 -triple %itanium_abi_triple | FileCheck %s2 3extern "C" int printf(...);4 5struct S {6  S() { printf("S::S\n"); }7};8 9struct A {10  double x;11  A() : x(), y(), s() { printf("x = %f y = %x \n", x, y); }12  int *y;13  S s;14};15 16A a;17 18struct B {19  B() = default;20  B(const B&);21};22 23// CHECK-NOT: _ZL1b24static B b;25 26struct C {27  ~C();28};29 30// CHECK: _ZL1c31static C c[4];32 33int main() {34}35 36namespace PR22793 {37template <typename>38struct foo {39protected:40// CHECK-NOT: _ZN7PR227933fooIiED2Ev41  ~foo() = default;42  friend void func();43};44 45void func() { foo<int> f; }46 47template struct foo<int>;48}49