aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/HeuristicResolver.cpp
diff options
context:
space:
mode:
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 cbdefaa..056e133 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())) {