diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-21 22:43:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-21 22:43:28 +0000 |
commit | 17e32f30e2d1eaf6639d3d4e2196a8d7c709fbac (patch) | |
tree | 553e33d929d90b512d3e7b71ccd8a13f436dbd4e /test | |
parent | c28bbc2d2271aab6c5d79ef2758604221cd92a4b (diff) |
Refactor instantiation of destructors to use the common CXXMethodDecl
code, fixing a problem where instantiations of out-of-line destructor
definitions would had the wrong lexical context.
Introduce tests for out-of-line definitions of the constructors,
destructors, and conversion functions of a class template partial
specialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp index 0321a7cfa3..bd9a06de31 100644 --- a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp @@ -5,11 +5,22 @@ struct A; template<typename T> struct A<T*, 2> { + A(T); + ~A(); + void f(T*); + operator T*(); + static T value; }; template<class X> void A<X*, 2>::f(X*) { } template<class X> X A<X*, 2>::value; + +template<class X> A<X*, 2>::A(X) { value = 0; } + +template<class X> A<X*, 2>::~A() { } + +template<class X> A<X*, 2>::operator X*() { return 0; }
\ No newline at end of file |