[clang][SSAF][NFC] Remove redundant overrides from analysis templates#193086
Open
[clang][SSAF][NFC] Remove redundant overrides from analysis templates#193086
Conversation
Member
|
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-ssaf Author: Aviral Goel (aviralg) ChangesThis PR removes redundant:
Full diff: https://github.com/llvm/llvm-project/pull/193086.diff 2 Files Affected:
diff --git a/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/DerivedAnalysis.h b/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/DerivedAnalysis.h
index 1b216ff85b947..ff9470e0a2284 100644
--- a/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/DerivedAnalysis.h
+++ b/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/DerivedAnalysis.h
@@ -97,13 +97,6 @@ class DerivedAnalysis : public DerivedAnalysisBase {
/// Called once with the fixed dependency results before the step() loop.
virtual llvm::Error initialize(const DepResultTs &...) = 0;
- /// Performs one step. Returns true if another step is needed; false when
- /// converged. Single-step analyses always return false.
- virtual llvm::Expected<bool> step() override = 0;
-
- /// Called after the step() loop converges. Override for post-processing.
- virtual llvm::Error finalize() override { return llvm::Error::success(); }
-
protected:
/// Read-only access to the result being built.
const ResultT &getResult() const & { return *Result; }
diff --git a/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/SummaryAnalysis.h b/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/SummaryAnalysis.h
index bac7166c79177..5b7c2c9b6b8c2 100644
--- a/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/SummaryAnalysis.h
+++ b/clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/SummaryAnalysis.h
@@ -93,16 +93,9 @@ class SummaryAnalysis : public SummaryAnalysisBase {
return Empty;
}
- /// Called once before the first add() call. Override for initialization.
- virtual llvm::Error initialize() override { return llvm::Error::success(); }
-
/// Called once per matching entity. Implement to accumulate data.
virtual llvm::Error add(EntityId Id, const EntitySummaryT &Summary) = 0;
- /// Called after all entities have been processed.
- /// Override for post-processing.
- virtual llvm::Error finalize() override { return llvm::Error::success(); }
-
protected:
/// Read-only access to the result being built.
const ResultT &getResult() const & { return *Result; }
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes redundant:
initialize()andfinalize()overrides fromSummaryAnalysisalready provided bySummaryAnalysisBase.step()andfinalize()overrides fromDerivedAnalysis<>already provided byDerivedAnalysisBase.