summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/destructor-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-03-08 21:25:01 +0000
committerDouglas Gregor <dgregor@apple.com>2013-03-08 21:25:01 +0000
commit303b96f255d61ae3dff913d777d3f40332786257 (patch)
tree7cb320d419682adc77feb7d9789c1fe80f05a5ef /test/SemaTemplate/destructor-template.cpp
parentf8f373f47210b88bdf71acb5579b129b665235ab (diff)
downloadclang-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.cpp19
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();
+ }
+}