https://github.com/HighCommander4 created 
https://github.com/llvm/llvm-project/pull/164353

None

>From 9d90d166b346c0344a16710a9651d76169621f12 Mon Sep 17 00:00:00 2001
From: Nathan Ridge <[email protected]>
Date: Mon, 20 Oct 2025 21:45:04 -0400
Subject: [PATCH] [clangd] Avoid calling resolveTypeOfCallExpr() twice in
 HeuristicResolver::resolveExprToType()

---
 clang/lib/Sema/HeuristicResolver.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/clang/lib/Sema/HeuristicResolver.cpp 
b/clang/lib/Sema/HeuristicResolver.cpp
index cbdefaa57aacb..056e13308b7d3 100644
--- a/clang/lib/Sema/HeuristicResolver.cpp
+++ b/clang/lib/Sema/HeuristicResolver.cpp
@@ -450,7 +450,12 @@ QualType HeuristicResolverImpl::resolveExprToType(const 
Expr *E) {
   if (const auto *CE = dyn_cast<CallExpr>(E)) {
     if (QualType Resolved = resolveTypeOfCallExpr(CE); !Resolved.isNull())
       return Resolved;
+
+    // Don't proceed to try resolveExprToDecls(), it would just call
+    // resolveTypeOfCallExpr() again.
+    return E->getType();
   }
+
   // Similarly, unwrapping a unary dereference operation does not work via
   // resolveExprToDecls.
   if (const auto *UO = dyn_cast<UnaryOperator>(E->IgnoreParenCasts())) {

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to