[clang] [NFC][LifetimeSafety]: Track assignment history within a single CFGBlock (PR #196075)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 23:47:59 PDT 2026


================
@@ -346,6 +346,16 @@ class FactManager {
     return BlockToFacts[B->getBlockID()];
   }
 
+  std::optional<size_t> getBlockID(const Fact *TargetFact) const {
+    for (size_t i = 0; i < BlockToFacts.size(); ++i) {
+      for (const Fact *F : BlockToFacts[i]) {
+        if (F == TargetFact)
+          return i;
+      }
+    }
----------------
usx95 wrote:

You can remove the curly braces for the `for` bodies.

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


More information about the cfe-commits mailing list