Skip to content

Commit 8e39f01

Browse files
committed
[FOLD] fix destructor lookup when the object expression is dependent
1 parent a719de8 commit 8e39f01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8069,6 +8069,10 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base,
80698069
return CreateRecoveryExpr(Base->getBeginLoc(), Base->getEndLoc(), {Base});
80708070
}
80718071

8072+
// We can't implicitly declare the destructor for a templated class.
8073+
if (BaseType->isDependentType())
8074+
MayBePseudoDestructor = true;
8075+
80728076
// C++ [basic.lookup.classref]p2:
80738077
// If the id-expression in a class member access (5.2.5) is an
80748078
// unqualified-id, and the type of the object expression is of a class

0 commit comments

Comments
 (0)