forked from OSchip/llvm-project
<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. llvm-svn: 176723
This commit is contained in:
parent
74ffc27d25
commit
a88c55b571
|
@ -7459,7 +7459,9 @@ TreeTransform<Derived>::TransformCXXPseudoDestructorExpr(
|
|||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue