diff options
author | Sam Estep <sam@samestep.com> | 2022-06-29 19:20:46 +0000 |
---|---|---|
committer | Sam Estep <sam@samestep.com> | 2022-06-29 19:20:58 +0000 |
commit | 335c05f5d19fecd5c0972ac801e58248d772a78e (patch) | |
tree | 9f25ffa15ace35aa71c46eeb780fcc43c89493ed /clang/unittests | |
parent | cafb8b4ff2c38f81e65f97193eb1d8d16c581522 (diff) |
[clang][dataflow] Use NoopLattice in optional model
Followup to D128352. This patch pulls the `NoopLattice` class out from the `NoopAnalysis.h` test file into its own `NoopLattice.h` source file, and uses it to replace usage of `SourceLocationsLattice` in `UncheckedOptionalAccessModel`.
Reviewed By: ymandel, sgatev, gribozavr2, xazax.hun
Differential Revision: https://reviews.llvm.org/D128356
Diffstat (limited to 'clang/unittests')
-rw-r--r-- | clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h b/clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h index eab5782095bb..45ed41440637 100644 --- a/clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h +++ b/clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h @@ -18,25 +18,11 @@ #include "clang/AST/Stmt.h" #include "clang/Analysis/FlowSensitive/DataflowAnalysis.h" #include "clang/Analysis/FlowSensitive/DataflowEnvironment.h" -#include "clang/Analysis/FlowSensitive/DataflowLattice.h" -#include <ostream> +#include "clang/Analysis/FlowSensitive/NoopLattice.h" namespace clang { namespace dataflow { -class NoopLattice { -public: - bool operator==(const NoopLattice &) const { return true; } - - LatticeJoinEffect join(const NoopLattice &) { - return LatticeJoinEffect::Unchanged; - } -}; - -inline std::ostream &operator<<(std::ostream &OS, const NoopLattice &) { - return OS << "noop"; -} - class NoopAnalysis : public DataflowAnalysis<NoopAnalysis, NoopLattice> { public: /// `ApplyBuiltinTransfer` controls whether to run the built-in transfer |