summaryrefslogtreecommitdiff
path: root/clang/lib/Sema/HeuristicResolver.cpp
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2025-10-22 10:55:10 -0700
committerFlorian Mayer <fmayer@google.com>2025-10-22 10:55:10 -0700
commita0abc0af0a0a90878822f8107d70dad6f7cdfc26 (patch)
tree3317f49277cc325327cfe3d9a7be4b6e9bacd0f5 /clang/lib/Sema/HeuristicResolver.cpp
parente8230892228fd3b3e543c869f1238fa199d48bc1 (diff)
parent735b1ad667ac7373c89ccc0f0e757ef418f8f790 (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/fmayer/spr/main.wip-smartpointers
Created using spr 1.3.7 [skip ci]
Diffstat (limited to 'clang/lib/Sema/HeuristicResolver.cpp')
-rw-r--r--clang/lib/Sema/HeuristicResolver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/HeuristicResolver.cpp b/clang/lib/Sema/HeuristicResolver.cpp
index cbdefaa57aac..056e13308b7d 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())) {