================
@@ -5736,11 +5736,20 @@ class ConceptInfo {
 // In particular, when E->getType() is DependentTy, try to guess a likely type.
 // We accept some lossiness (like dropping parameters).
 // We only try to handle common expressions on the LHS of MemberExpr.
-QualType getApproximateType(const Expr *E) {
+QualType getApproximateType(const Expr *E, HeuristicResolver &Resolver) {
   if (E->getType().isNull())
     return QualType();
   E = E->IgnoreParenImpCasts();
   QualType Unresolved = E->getType();
+  // Resolve DependentNameType
+  if (const auto *DNT = Unresolved->getAs<DependentNameType>()) {
+    auto Decls = Resolver.resolveDependentNameType(DNT);
+    if (Decls.size() == 1) {
+      if (const auto *TD = dyn_cast<TypeDecl>(Decls[0])) {
----------------
hokein wrote:

nit: for single-statement body, llvm code style prefers to not use braces.

https://github.com/llvm/llvm-project/pull/123818
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to