diff --git a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp --- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -342,11 +342,8 @@ std::vector> BlockStates( CFCtx.getCFG().size(), llvm::None); - // The entry basic block doesn't contain statements so it can be skipped. const CFGBlock &Entry = CFCtx.getCFG().getEntry(); - BlockStates[Entry.getBlockID()] = {Analysis.typeErasedInitialElement(), - InitEnv}; - Worklist.enqueueSuccessors(&Entry); + Worklist.enqueueBlock(&Entry); // Bugs in lattices and transfer functions can prevent the analysis from // converging. To limit the damage (infinite loops) that these bugs can cause,