File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -304,18 +304,14 @@ std::vector<const NamedDecl *> HeuristicResolverImpl::resolveMemberExpr(
304304
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
307- const auto ExplicitMemberHeuristic =
308- [&](const Expr *Base) -> QualType {
307+ const auto ExplicitMemberHeuristic = [&](const Expr *Base) -> QualType {
309308 if (auto *DeclRef = dyn_cast_if_present<DeclRefExpr>(Base)) {
310309 auto *PrDecl = dyn_cast_if_present<ParmVarDecl>(DeclRef->getDecl ());
311310
312311 if (PrDecl && PrDecl->isExplicitObjectParameter ()) {
313- auto CxxRecord = dyn_cast_if_present<CXXRecordDecl>(
314- PrDecl->getDeclContext ()->getParent ());
315-
316- if (CxxRecord) {
317- return Ctx.getTypeDeclType (dyn_cast<TypeDecl>(CxxRecord));
318- }
312+ // get the parent, a cxxrecord
313+ return Ctx.getTypeDeclType (
314+ dyn_cast<TypeDecl>(PrDecl->getDeclContext ()->getParent ()));
319315 }
320316 }
321317
You can’t perform that action at this time.
0 commit comments