[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 28 09:49:24 PDT 2023


xazax.hun added inline comments.


================
Comment at: clang/lib/Analysis/IntervalPartition.cpp:121
+    Index.emplace(N, ID);
+  Graph.Intervals.emplace_back(ID, Header, std::move(Data.Nodes));
 }
----------------
It would probably take for me some time to understand what is going on here, but I think this part might worth a comment. In particular, I have the impression that `Graph.Intervals` is the owner of all the intervals. But we use pointers to refer to these intervals. What would guarantee that those pointers are not being invalidated by this `emplace_back` operations?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153058/new/

https://reviews.llvm.org/D153058



More information about the cfe-commits mailing list