diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-03-08 21:25:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-03-08 21:25:01 +0000 |
commit | 303b96f255d61ae3dff913d777d3f40332786257 (patch) | |
tree | 7cb320d419682adc77feb7d9789c1fe80f05a5ef /test/SemaTemplate/destructor-template.cpp | |
parent | f8f373f47210b88bdf71acb5579b129b665235ab (diff) | |
download | clang-303b96f255d61ae3dff913d777d3f40332786257.tar.gz |
<rdar://problem/13140795> Transform the scope type of a pseudo-destructor expression within the object scope.
We were transforming the scope type of a pseudo-destructor expression
(e.g., the first T in x->T::~T()) as a freestanding type, which meant
that dependent template specialization types here would stay dependent
even when no template parameters were named. This would eventually
mean that a dependent expression would end up in what should be
fully-instantiated ASTs, causing IRgen to assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/destructor-template.cpp')
-rw-r--r-- | test/SemaTemplate/destructor-template.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaTemplate/destructor-template.cpp b/test/SemaTemplate/destructor-template.cpp index 07beda40aa..6806c24a84 100644 --- a/test/SemaTemplate/destructor-template.cpp +++ b/test/SemaTemplate/destructor-template.cpp @@ -57,3 +57,22 @@ namespace PR7904 { }; Foo f; } + +namespace rdar13140795 { + template <class T> class shared_ptr {}; + + template <typename T> struct Marshal { + static int gc(); + }; + + + template <typename T> int Marshal<T>::gc() { + shared_ptr<T> *x; + x->template shared_ptr<T>::~shared_ptr(); + return 0; + } + + void test() { + Marshal<int>::gc(); + } +} |