aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/defaulted-destructor-in-temporary.cpp
blob: cbd4950c6af8e9c0a42d8d4f0649246a55cf3f25 (plain)
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
// RUN: %clang_cc1 -std=c++11 -triple=x86_64-apple-darwin %s -emit-llvm -o - | FileCheck %s

// CHECK: define linkonce_odr {{.*}} @_ZN3StrD1Ev

class A {
public:
  ~A();
};
class Str {
  A d;

public:
  ~Str() = default;
};
class E {
  Str s;
  template <typename>
  void h() {
    s = {};
  }
  void f();
};
void E::f() {
  h<int>();
}