[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

Antonio Frighetto via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 09:33:10 PST 2023


================
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
   } else
     llvm_unreachable("no definition for emitted function");
 
+  // This is checked after emitting the function body so we know if there
+  // are any permitted infinite loops.
----------------
antoniofrighetto wrote:

Not sure about this, I assumed that this was the only way to know, as per comment says, if there are any permitted infinite loops.

https://github.com/llvm/llvm-project/pull/71452


More information about the cfe-commits mailing list