File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ std::vector<const NamedDecl *> HeuristicResolverImpl::resolveMemberExpr(
305305 // check if member expr is in the context of an explicit object method
306306 // If so, it's safe to assume the templated arg is of type of the record
307307 const auto ExplicitMemberHeuristic =
308- [&](const Expr *Base) -> std::optional< QualType> {
308+ [&](const Expr *Base) -> QualType {
309309 if (auto *DeclRef = dyn_cast_if_present<DeclRefExpr>(Base)) {
310310 auto *PrDecl = dyn_cast_if_present<ParmVarDecl>(DeclRef->getDecl ());
311311
@@ -319,15 +319,15 @@ std::vector<const NamedDecl *> HeuristicResolverImpl::resolveMemberExpr(
319319 }
320320 }
321321
322- return std:: nullopt ;
322+ return {} ;
323323 };
324324
325325 // Try resolving the member inside the expression's base type.
326326 Expr *Base = ME->isImplicitAccess () ? nullptr : ME->getBase ();
327327 QualType BaseType = ME->getBaseType ();
328328
329- if (auto Type = ExplicitMemberHeuristic (Base)) {
330- BaseType = * Type;
329+ if (auto Type = ExplicitMemberHeuristic (Base); !Type. isNull () ) {
330+ BaseType = Type;
331331 }
332332
333333 BaseType = simplifyType (BaseType, Base, ME->isArrow ());
You can’t perform that action at this time.
0 commit comments