[clang] 7645a76 - [clang][dataflow] Remove legacy version of `runDataflowAnalysis()`. (#101146)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 02:30:40 PDT 2024
Author: martinboehme
Date: 2024-07-30T11:30:37+02:00
New Revision: 7645a7690de1c050d933a2dbe1e9156057006333
URL: https://github.com/llvm/llvm-project/commit/7645a7690de1c050d933a2dbe1e9156057006333
DIFF: https://github.com/llvm/llvm-project/commit/7645a7690de1c050d933a2dbe1e9156057006333.diff
LOG: [clang][dataflow] Remove legacy version of `runDataflowAnalysis()`. (#101146)
Added:
Modified:
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
Removed:
################################################################################
diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
index 50a7018872061..e6efde091871f 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
+++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
@@ -233,7 +233,7 @@ llvm::Expected<std::vector<
std::optional<DataflowAnalysisState<typename AnalysisT::Lattice>>>>
runDataflowAnalysis(const AdornedCFG &ACFG, AnalysisT &Analysis,
const Environment &InitEnv,
- CFGEltCallbacks<AnalysisT> PostAnalysisCallbacks,
+ CFGEltCallbacks<AnalysisT> PostAnalysisCallbacks = {},
std::int32_t MaxBlockVisits = kDefaultMaxBlockVisits) {
CFGEltCallbacksTypeErased TypeErasedCallbacks;
if (PostAnalysisCallbacks.Before) {
@@ -286,22 +286,6 @@ runDataflowAnalysis(const AdornedCFG &ACFG, AnalysisT &Analysis,
return std::move(BlockStates);
}
-/// Overload that takes only one post-analysis callback, which is run on the
-/// state after visiting the `CFGElement`. This is provided for backwards
-/// compatibility; new callers should call the overload taking `CFGEltCallbacks`
-/// instead.
-template <typename AnalysisT>
-llvm::Expected<std::vector<
- std::optional<DataflowAnalysisState<typename AnalysisT::Lattice>>>>
-runDataflowAnalysis(
- const AdornedCFG &ACFG, AnalysisT &Analysis, const Environment &InitEnv,
- CFGEltCallback<AnalysisT> PostAnalysisCallbackAfterElt = nullptr,
- std::int32_t MaxBlockVisits = kDefaultMaxBlockVisits) {
- return runDataflowAnalysis(ACFG, Analysis, InitEnv,
- {nullptr, PostAnalysisCallbackAfterElt},
- MaxBlockVisits);
-}
-
// Create an analysis class that is derived from `DataflowAnalysis`. This is an
// SFINAE adapter that allows us to call two
diff erent variants of constructor
// (either with or without the optional `Environment` parameter).
More information about the cfe-commits
mailing list