diff options
author | Sam Estep <sam@samestep.com> | 2022-07-26 17:30:09 +0000 |
---|---|---|
committer | Sam Estep <sam@samestep.com> | 2022-07-26 17:30:09 +0000 |
commit | cc9aa157a83a4da52f9749807429205583d815da (patch) | |
tree | 97c60cbfb5630bb7a57a85013e6425bf5a905999 /clang/include | |
parent | fa2b83d07ecab3b24b4c5ee2e7dc4b6bbc895317 (diff) | |
download | llvm-cc9aa157a83a4da52f9749807429205583d815da.zip llvm-cc9aa157a83a4da52f9749807429205583d815da.tar.gz llvm-cc9aa157a83a4da52f9749807429205583d815da.tar.bz2 |
Revert "[clang][dataflow] Analyze calls to in-TU functions"
This reverts commit fa2b83d07ecab3b24b4c5ee2e7dc4b6bbc895317.
Diffstat (limited to 'clang/include')
3 files changed, 2 insertions, 33 deletions
diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h b/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h index 2e9c088..f17df36 100644 --- a/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h +++ b/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h @@ -128,21 +128,6 @@ public: /// with a symbolic representation of the `this` pointee. Environment(DataflowAnalysisContext &DACtx, const DeclContext &DeclCtx); - /// Creates and returns an environment to use for an inline analysis of the - /// callee. Uses the storage location from each argument in the `Call` as the - /// storage location for the corresponding parameter in the callee. - /// - /// Requirements: - /// - /// The callee of `Call` must be a `FunctionDecl` with a body. - /// - /// The body of the callee must not reference globals. - /// - /// The arguments of `Call` must map 1:1 to the callee's parameters. - /// - /// Each argument of `Call` must already have a `StorageLocation`. - Environment pushCall(const CallExpr *Call) const; - /// Returns true if and only if the environment is equivalent to `Other`, i.e /// the two environments: /// - have the same mappings from declarations to storage locations, diff --git a/clang/include/clang/Analysis/FlowSensitive/Transfer.h b/clang/include/clang/Analysis/FlowSensitive/Transfer.h index cbb6254..25afa01 100644 --- a/clang/include/clang/Analysis/FlowSensitive/Transfer.h +++ b/clang/include/clang/Analysis/FlowSensitive/Transfer.h @@ -20,12 +20,6 @@ namespace clang { namespace dataflow { -struct TransferOptions { - /// Determines whether to analyze function bodies when present in the - /// translation unit. - bool ContextSensitive = false; -}; - /// Maps statements to the environments of basic blocks that contain them. class StmtToEnvMap { public: @@ -42,8 +36,7 @@ public: /// Requirements: /// /// `S` must not be `ParenExpr` or `ExprWithCleanups`. -void transfer(const StmtToEnvMap &StmtToEnv, const Stmt &S, Environment &Env, - TransferOptions Options); +void transfer(const StmtToEnvMap &StmtToEnv, const Stmt &S, Environment &Env); } // namespace dataflow } // namespace clang diff --git a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h index 92700f1..b043062 100644 --- a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h +++ b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h @@ -23,7 +23,6 @@ #include "clang/Analysis/FlowSensitive/ControlFlowContext.h" #include "clang/Analysis/FlowSensitive/DataflowEnvironment.h" #include "clang/Analysis/FlowSensitive/DataflowLattice.h" -#include "clang/Analysis/FlowSensitive/Transfer.h" #include "llvm/ADT/Any.h" #include "llvm/ADT/Optional.h" #include "llvm/Support/Error.h" @@ -37,9 +36,6 @@ struct DataflowAnalysisOptions { // (at which point the built-in transfer functions can be simply a standalone // analysis). bool ApplyBuiltinTransfer = true; - - /// Only has an effect if `ApplyBuiltinTransfer` is true. - TransferOptions BuiltinTransferOptions; }; /// Type-erased lattice element container. @@ -61,7 +57,7 @@ public: /// Deprecated. Use the `DataflowAnalysisOptions` constructor instead. TypeErasedDataflowAnalysis(bool ApplyBuiltinTransfer) - : Options({ApplyBuiltinTransfer, TransferOptions{}}) {} + : Options({ApplyBuiltinTransfer}) {} TypeErasedDataflowAnalysis(DataflowAnalysisOptions Options) : Options(Options) {} @@ -94,11 +90,6 @@ public: /// Determines whether to apply the built-in transfer functions, which model /// the heap and stack in the `Environment`. bool applyBuiltinTransfer() const { return Options.ApplyBuiltinTransfer; } - - /// Returns the options to be passed to the built-in transfer functions. - TransferOptions builtinTransferOptions() const { - return Options.BuiltinTransferOptions; - } }; /// Type-erased model of the program at a given program point. |