[clang] 5659908 - [clang][dataflow][NFC] Resize vector directly with ctor
Eric Li via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 4 10:12:51 PDT 2022
Author: Eric Li
Date: 2022-08-04T13:12:37-04:00
New Revision: 5659908f4c6d32d3f7d1ebbe014fbd9419cdfb9c
URL: https://github.com/llvm/llvm-project/commit/5659908f4c6d32d3f7d1ebbe014fbd9419cdfb9c
DIFF: https://github.com/llvm/llvm-project/commit/5659908f4c6d32d3f7d1ebbe014fbd9419cdfb9c.diff
LOG: [clang][dataflow][NFC] Resize vector directly with ctor
Differential Revision: https://reviews.llvm.org/D131177
Added:
Modified:
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
index 32fb48470b14..fe650200e4e3 100644
--- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
+++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
@@ -339,8 +339,8 @@ runTypeErasedDataflowAnalysis(
PostOrderCFGView POV(&CFCtx.getCFG());
ForwardDataflowWorklist Worklist(CFCtx.getCFG(), &POV);
- std::vector<llvm::Optional<TypeErasedDataflowAnalysisState>> BlockStates;
- BlockStates.resize(CFCtx.getCFG().size(), llvm::None);
+ std::vector<llvm::Optional<TypeErasedDataflowAnalysisState>> 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();
More information about the cfe-commits
mailing list