mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 09:56:33 +00:00

Otherwise we will fail to generate the definition of a defaulted destructor, if the only reference was in a templated temporary. rdar://89366678 Differential Revision: https://reviews.llvm.org/D120426
26 lines
337 B
C++
26 lines
337 B
C++
// 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>();
|
|
}
|