Skip to content

Commit aa5f785

Browse files
committed
Remove useless C99 check
1 parent 2acda98 commit aa5f785

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clang/lib/CodeGen/CGStmt.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,11 +928,8 @@ bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression,
928928
bool CondIsTrue = CondIsConstInt && (!ControllingExpression ||
929929
Result.Val.getInt().getBoolValue());
930930

931-
if (getLangOpts().C99 && CondIsConstInt)
932-
return false;
933-
934931
// Loops with non-constant conditions must make progress in C11 and later.
935-
if (getLangOpts().C11)
932+
if (getLangOpts().C11 && !CondIsConstInt)
936933
return true;
937934

938935
// [C++26][intro.progress] (DR)

0 commit comments

Comments
 (0)