diff options
Diffstat (limited to 'test/SemaTemplate/destructor-template.cpp')
-rw-r--r-- | test/SemaTemplate/destructor-template.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/SemaTemplate/destructor-template.cpp b/test/SemaTemplate/destructor-template.cpp index 4e1af9ad1f96..853ba492f8e7 100644 --- a/test/SemaTemplate/destructor-template.cpp +++ b/test/SemaTemplate/destructor-template.cpp @@ -52,9 +52,13 @@ namespace PR7239 { } namespace PR7904 { - struct Foo { - template <int i> ~Foo() {} // expected-error{{destructor cannot be declared as a template}} - }; + struct Foo {}; + template <class T> + Foo::~Foo() { // expected-error{{destructor cannot be declared as a template}} + T t; + T &pT = t; + pT; + } Foo f; } |