Skip to content

Commit 003566c

Browse files
committed
[clang][dataflow] Remove deprecated overloads of checkDataflow in TestingSupport.h.
Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D134081
1 parent eaa2634 commit 003566c

File tree

1 file changed

+0
-91
lines changed

1 file changed

+0
-91
lines changed

clang/unittests/Analysis/FlowSensitive/TestingSupport.h

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -356,97 +356,6 @@ checkDataflow(AnalysisInputs<AnalysisT> AI,
356356
});
357357
}
358358

359-
// Deprecated.
360-
// FIXME: Remove this function after usage has been updated to the overload
361-
// which uses the `AnalysisInputs` struct.
362-
//
363-
/// Runs dataflow specified from `MakeAnalysis` on the body of the function that
364-
/// matches `TargetFuncMatcher` in `Code`. Given the state computed at each
365-
/// annotated statement, `VerifyResults` checks that the results from the
366-
/// analysis are correct.
367-
///
368-
/// Requirements:
369-
///
370-
/// `AnalysisT` contains a type `Lattice`.
371-
///
372-
/// `Code`, `TargetFuncMatcher`, `MakeAnalysis` and `VerifyResults` must be
373-
/// provided.
374-
///
375-
/// Any annotations appearing in `Code` must come after a statement.
376-
///
377-
/// There can be at most one annotation attached per statement.
378-
///
379-
/// Annotations must not be repeated.
380-
template <typename AnalysisT>
381-
llvm::Error checkDataflow(
382-
llvm::StringRef Code,
383-
ast_matchers::internal::Matcher<FunctionDecl> TargetFuncMatcher,
384-
std::function<AnalysisT(ASTContext &, Environment &)> MakeAnalysis,
385-
std::function<void(
386-
llvm::ArrayRef<std::pair<
387-
std::string, DataflowAnalysisState<typename AnalysisT::Lattice>>>,
388-
ASTContext &)>
389-
VerifyResults,
390-
ArrayRef<std::string> Args,
391-
const tooling::FileContentMappings &VirtualMappedFiles = {}) {
392-
return checkDataflow<AnalysisT>(
393-
AnalysisInputs<AnalysisT>(Code, std::move(TargetFuncMatcher),
394-
std::move(MakeAnalysis))
395-
.withASTBuildArgs(std::move(Args))
396-
.withASTBuildVirtualMappedFiles(std::move(VirtualMappedFiles)),
397-
[&VerifyResults](const llvm::StringMap<DataflowAnalysisState<
398-
typename AnalysisT::Lattice>> &AnnotationStates,
399-
const AnalysisOutputs &AO) {
400-
std::vector<std::pair<
401-
std::string, DataflowAnalysisState<typename AnalysisT::Lattice>>>
402-
AnnotationStatesAsVector;
403-
for (const auto &P : AnnotationStates) {
404-
AnnotationStatesAsVector.push_back(
405-
std::make_pair(P.first().str(), std::move(P.second)));
406-
}
407-
llvm::sort(AnnotationStatesAsVector,
408-
[](auto a, auto b) { return a.first < b.first; });
409-
410-
VerifyResults(AnnotationStatesAsVector, AO.ASTCtx);
411-
});
412-
}
413-
414-
// Deprecated.
415-
// FIXME: Remove this function after usage has been updated to the overload
416-
// which uses the `AnalysisInputs` struct.
417-
//
418-
/// Runs dataflow specified from `MakeAnalysis` on the body of the function
419-
/// named `TargetFun` in `Code`. Given the state computed at each annotated
420-
/// statement, `VerifyResults` checks that the results from the analysis are
421-
/// correct.
422-
///
423-
/// Requirements:
424-
///
425-
/// `AnalysisT` contains a type `Lattice`.
426-
///
427-
/// Any annotations appearing in `Code` must come after a statement.
428-
///
429-
/// `Code`, `TargetFun`, `MakeAnalysis` and `VerifyResults` must be provided.
430-
///
431-
/// There can be at most one annotation attached per statement.
432-
///
433-
/// Annotations must not be repeated.
434-
template <typename AnalysisT>
435-
llvm::Error checkDataflow(
436-
llvm::StringRef Code, llvm::StringRef TargetFun,
437-
std::function<AnalysisT(ASTContext &, Environment &)> MakeAnalysis,
438-
std::function<void(
439-
llvm::ArrayRef<std::pair<
440-
std::string, DataflowAnalysisState<typename AnalysisT::Lattice>>>,
441-
ASTContext &)>
442-
VerifyResults,
443-
ArrayRef<std::string> Args,
444-
const tooling::FileContentMappings &VirtualMappedFiles = {}) {
445-
return checkDataflow<AnalysisT>(
446-
Code, ast_matchers::hasName(TargetFun), std::move(MakeAnalysis),
447-
std::move(VerifyResults), Args, VirtualMappedFiles);
448-
}
449-
450359
/// Returns the `ValueDecl` for the given identifier.
451360
///
452361
/// Requirements:

0 commit comments

Comments
 (0)