Index: clang/include/clang/Analysis/Analyses/Dominators.h =================================================================== --- clang/include/clang/Analysis/Analyses/Dominators.h +++ clang/include/clang/Analysis/Analyses/Dominators.h @@ -101,7 +101,12 @@ "LLVM's Dominator tree builder uses nullpointers to signify the " "virtual root!"); - DomTreeNode *IDom = DT.getNode(*I)->getIDom(); + auto *Node = DT.getNode(*I); + if (Node == nullptr) { + continue; + } + + DomTreeNode *IDom = Node->getIDom(); if (IDom && IDom->getBlock()) llvm::errs() << "(" << (*I)->getBlockID() << ","