Skip to content

Commit 8c4cf23

Browse files
committed
Fix crash in InfinteLoopCheck
1 parent 019ab61 commit 8c4cf23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ static std::string getCondVarNames(const Stmt *Cond) {
153153
}
154154

155155
static bool isKnownFalse(const Expr &Cond, const ASTContext &Ctx) {
156+
if (Cond.isValueDependent())
157+
return false;
156158
bool Result = false;
157159
if (Cond.EvaluateAsBooleanCondition(Result, Ctx))
158160
return !Result;

0 commit comments

Comments
 (0)