================ @@ -302,33 +317,17 @@ std::vector<const NamedDecl *> HeuristicResolverImpl::resolveMemberExpr( return {}; } - // check if member expr is in the context of an explicit object method - // If so, it's safe to assume the templated arg is of type of the record - const auto ExplicitMemberHeuristic = [&](const Expr *Base) -> QualType { - if (auto *DeclRef = dyn_cast_if_present<DeclRefExpr>(Base)) { - auto *PrDecl = dyn_cast_if_present<ParmVarDecl>(DeclRef->getDecl()); - - if (PrDecl && PrDecl->isExplicitObjectParameter()) { - // get the parent, a cxxrecord - return Ctx.getTypeDeclType( - dyn_cast<TypeDecl>(PrDecl->getDeclContext()->getParent())); - } - } - - return {}; - }; - // Try resolving the member inside the expression's base type. Expr *Base = ME->isImplicitAccess() ? nullptr : ME->getBase(); QualType BaseType = ME->getBaseType(); BaseType = simplifyType(BaseType, Base, ME->isArrow()); - if (!BaseType.isNull() && - (BaseType->isUndeducedAutoType() || BaseType->isTemplateTypeParmType())) { - if (auto Type = ExplicitMemberHeuristic(Base); !Type.isNull()) { - BaseType = Type; - } - } + // fflush(stdout); ---------------- HighCommander4 wrote:
some debugging code snuck in here https://github.com/llvm/llvm-project/pull/155143 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits