================
@@ -908,6 +908,74 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) {
     incrementProfileCounter(&S);
 }
 
+bool CodeGenFunction::checkIfLoopMustProgress(const Expr 
*ControllingExpression,
+                                              bool IsTrivialCXXLoop) {
+  if (CGM.getCodeGenOpts().getFiniteLoops() ==
+      CodeGenOptions::FiniteLoopsKind::Never)
+    return false;
+
+  if (CGM.getCodeGenOpts().getFiniteLoops() ==
+          CodeGenOptions::FiniteLoopsKind::Always &&
+      !getLangOpts().CPlusPlus11)
----------------
cor3ntin wrote:

Yes, I wasn't sure what to do here. Does it make sense to override the 
standard? but given the loop is for sure infinite, it could be spelled `--ub`.
On the other hand, if we override all modes, is the flag useful at all?

https://github.com/llvm/llvm-project/pull/90066
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to