summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkadir çetinkaya <kadircetinkaya.06.tr@gmail.com>2025-02-11 09:13:27 +0100
committerGitHub <noreply@github.com>2025-02-11 09:13:27 +0100
commitc7cfe02fd5be25ff65b42bd21cb16fa27933af64 (patch)
tree26efb4cbbfd0371e5e02ca39cb98bd28c6a37d35
parent780894689ff741c761457eec1c925679309336a3 (diff)
Revert "[clang][HeuristicResolver] Additional hardening against an infinite l…"revert-126690-users/HighCommander4/issue-126536-additional
This reverts commit 780894689ff741c761457eec1c925679309336a3.
-rw-r--r--clang/lib/Sema/HeuristicResolver.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Sema/HeuristicResolver.cpp b/clang/lib/Sema/HeuristicResolver.cpp
index adce403412f6..3cbf33dcdced 100644
--- a/clang/lib/Sema/HeuristicResolver.cpp
+++ b/clang/lib/Sema/HeuristicResolver.cpp
@@ -258,11 +258,7 @@ QualType HeuristicResolverImpl::simplifyType(QualType Type, const Expr *E,
}
return T;
};
- // As an additional protection against infinite loops, bound the number of
- // simplification steps.
- size_t StepCount = 0;
- const size_t MaxSteps = 64;
- while (!Current.Type.isNull() && StepCount++ < MaxSteps) {
+ while (!Current.Type.isNull()) {
TypeExprPair New = SimplifyOneStep(Current);
if (New.Type == Current.Type)
break;