Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjCXX / pseudo-destructor.mm
blob2f23ec037a43c18ba157fb3f3a002dc04ea45dcb
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 __attribute__((objc_root_class))
5 @interface Root
6 @end
8 @class Forward;
10 template <class T> void destroyPointer(T *t) {
11   t->~T();
14 template <class T> void destroyReference(T &t) {
15   t.~T();
18 template void destroyPointer<Root*>(Root **);
19 template void destroyReference<Root*>(Root *&);
21 template void destroyPointer<Forward*>(Forward **);
22 template void destroyReference<Forward*>(Forward *&);