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
TypeSourceInfo *ScopeTypeInfo = 0;
if (E->getScopeTypeInfo()) {
- ScopeTypeInfo = getDerived().TransformType(E->getScopeTypeInfo());
+ CXXScopeSpec EmptySS;
+ ScopeTypeInfo = getDerived().TransformTypeInObjectScope(
+ E->getScopeTypeInfo(), ObjectType, 0, EmptySS);
if (!ScopeTypeInfo)
return ExprError();
}
};
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();
+ }
+}