Skip to content

Commit

Permalink
Revert "[clang][dataflow] Add framework for testing analyses."
Browse files Browse the repository at this point in the history
This reverts commit 47d526d.

The commit is failing to build on some platforms. Rolling back while we investigate.
  • Loading branch information
ymand committed Dec 10, 2021
1 parent d2b68c4 commit 28d3976
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 537 deletions.
Expand Up @@ -78,8 +78,7 @@ struct TypeErasedDataflowAnalysisState {

/// Transfers the state of a basic block by evaluating each of its statements in
/// the context of `Analysis` and the states of its predecessors that are
/// available in `BlockStates`. `HandleTransferredStmt` (if provided) will be
/// applied to each statement in the block, after it is evaluated.
/// available in `BlockStates`.
///
/// Requirements:
///
Expand All @@ -89,10 +88,7 @@ struct TypeErasedDataflowAnalysisState {
TypeErasedDataflowAnalysisState transferBlock(
std::vector<llvm::Optional<TypeErasedDataflowAnalysisState>> &BlockStates,
const CFGBlock &Block, const Environment &InitEnv,
TypeErasedDataflowAnalysis &Analysis,
std::function<void(const CFGStmt &,
const TypeErasedDataflowAnalysisState &)>
HandleTransferredStmt = nullptr);
TypeErasedDataflowAnalysis &Analysis);

/// Performs dataflow analysis and returns a mapping from basic block IDs to
/// dataflow analysis states that model the respective basic blocks. Indices
Expand Down
Expand Up @@ -66,10 +66,7 @@ static TypeErasedDataflowAnalysisState computeBlockInputState(
TypeErasedDataflowAnalysisState transferBlock(
std::vector<llvm::Optional<TypeErasedDataflowAnalysisState>> &BlockStates,
const CFGBlock &Block, const Environment &InitEnv,
TypeErasedDataflowAnalysis &Analysis,
std::function<void(const CFGStmt &,
const TypeErasedDataflowAnalysisState &)>
HandleTransferredStmt) {
TypeErasedDataflowAnalysis &Analysis) {
TypeErasedDataflowAnalysisState State =
computeBlockInputState(BlockStates, Block, InitEnv, Analysis);
for (const CFGElement &Element : Block) {
Expand All @@ -82,8 +79,6 @@ TypeErasedDataflowAnalysisState transferBlock(

State.Lattice = Analysis.transferTypeErased(Stmt.getValue().getStmt(),
State.Lattice, State.Env);
if (HandleTransferredStmt != nullptr)
HandleTransferredStmt(Stmt.getValue(), State);
}
return State;
}
Expand Down
7 changes: 0 additions & 7 deletions clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
Expand Up @@ -3,8 +3,6 @@ set(LLVM_LINK_COMPONENTS
)

add_clang_unittest(ClangAnalysisFlowSensitiveTests
TestingSupport.cpp
TestingSupportTest.cpp
TypeErasedDataflowAnalysisTest.cpp
)

Expand All @@ -16,13 +14,8 @@ clang_target_link_libraries(ClangAnalysisFlowSensitiveTests
clangASTMatchers
clangBasic
clangFrontend
clangLex
clangSerialization
clangTesting
clangTooling
)

target_link_libraries(ClangAnalysisFlowSensitiveTests
PRIVATE
LLVMTestingSupport
)
170 changes: 0 additions & 170 deletions clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp

This file was deleted.

0 comments on commit 28d3976

Please sign in to comment.