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 | |
10 | template <class T> void destroyPointer(T *t) { |
11 | t->~T(); |
12 | } |
13 | |
14 | template <class T> void destroyReference(T &t) { |
15 | t.~T(); |
16 | } |
17 | |
18 | template void destroyPointer<Root*>(Root **); |
19 | template void destroyReference<Root*>(Root *&); |
20 | |
21 | // rdar://18522255 |
22 | template void destroyPointer<Forward*>(Forward **); |
23 | template void destroyReference<Forward*>(Forward *&); |
24 | |