[PATCH] D156411: [clang][dataflow] HTMLLogger: Don't crash if CFG contains unreachable blocks.
Martin Böhme via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 27 06:02:54 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG771d7d71df41: [clang][dataflow] HTMLLogger: Don't crash if CFG contains unreachable blocks. (authored by mboehme).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156411/new/
https://reviews.llvm.org/D156411
Files:
clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
Index: clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
===================================================================
--- clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
+++ clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
@@ -462,8 +462,9 @@
GraphS << " " << blockID(I) << " [id=" << blockID(I) << "]\n";
for (const auto *Block : CFG) {
for (const auto &Succ : Block->succs()) {
- GraphS << " " << blockID(Block->getBlockID()) << " -> "
- << blockID(Succ.getReachableBlock()->getBlockID()) << "\n";
+ if (Succ.getReachableBlock())
+ GraphS << " " << blockID(Block->getBlockID()) << " -> "
+ << blockID(Succ.getReachableBlock()->getBlockID()) << "\n";
}
}
GraphS << "}\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156411.544733.patch
Type: text/x-patch
Size: 769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230727/a8304acf/attachment-0001.bin>
More information about the cfe-commits
mailing list