diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-20 22:29:11 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-20 22:29:11 +0000 |
| commit | 7dac3712a2dd59d8a892f7c042521fb346616d9f (patch) | |
| tree | d8d7d21dc17ac830d65ca11d38566cebdb55236b /clang/test | |
| parent | 4afe9a35186a0c82f93e1f5271d11e32ec7331b1 (diff) | |
| download | bcm5719-llvm-7dac3712a2dd59d8a892f7c042521fb346616d9f.tar.gz bcm5719-llvm-7dac3712a2dd59d8a892f7c042521fb346616d9f.zip | |
Make sure we instantiate the destructor for variables initialized by
assignment.
llvm-svn: 91798
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-decl-dtor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-decl-dtor.cpp b/clang/test/SemaTemplate/instantiate-decl-dtor.cpp new file mode 100644 index 00000000000..193d9764c28 --- /dev/null +++ b/clang/test/SemaTemplate/instantiate-decl-dtor.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify + +template <typename T> struct A { + T x; + A(int y) { x = y; } + ~A() { *x = 10; } // expected-error {{indirection requires pointer operand}} +}; + +void a() { + A<int> b = 10; // expected-note {{requested here}} +} |

