[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 11:35:19 PDT 2024
================
@@ -1465,6 +1465,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
// Ensure that the function adheres to the forward progress guarantee, which
// is required by certain optimizations.
+ // The attribute will be removed if the body contains a trivial empty loop.
----------------
shafik wrote:
```suggestion
// In C++11 and forward, the attribute will be removed if the body contains a trivial empty loop.
```
https://github.com/llvm/llvm-project/pull/90066
More information about the cfe-commits
mailing list