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";
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";
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits