• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2// expected-no-diagnostics
3
4__attribute__((objc_root_class))
5@interface Root
6@end
7
8@class Forward;
9
10template <class T> void destroyPointer(T *t) {
11  t->~T();
12}
13
14template <class T> void destroyReference(T &t) {
15  t.~T();
16}
17
18template void destroyPointer<Root*>(Root **);
19template void destroyReference<Root*>(Root *&);
20
21// rdar://18522255
22template void destroyPointer<Forward*>(Forward **);
23template void destroyReference<Forward*>(Forward *&);
24