[PATCH] D118178: [clang][dataflow] Allow clients to disable built-in transfer functions.
Stanislav Gatev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 26 07:12:21 PST 2022
sgatev accepted this revision.
sgatev added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h:44
class TypeErasedDataflowAnalysis {
+ // Determines whether to apply the built-in transfer functions.
+ bool ApplyBuiltinTransfer;
----------------
We use `///` to start a doc comment.
================
Comment at: clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h:45
+ // Determines whether to apply the built-in transfer functions.
+ bool ApplyBuiltinTransfer;
+
----------------
Let's add a FIXME to consider removing this if the framework gains support for composite analyses.
================
Comment at: clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h:77
+
+ // Determines whether to apply the built-in transfer functions, which model
+ // the heap and stack in the `Environment`.
----------------
We use `///` to start a doc comment.
================
Comment at: clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h:79
+ // the heap and stack in the `Environment`.
+ bool applyBuiltinTransfer() { return ApplyBuiltinTransfer; }
};
----------------
Make this member const?
================
Comment at: clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h:42
public:
- NoopAnalysis(ASTContext &Context)
- : DataflowAnalysis<NoopAnalysis, NoopLattice>(Context) {}
+ // `ApplyBuiltinTransfer` controls whether to run the built-in transfer
+ // functions that model memory during the analysis.
----------------
We use `///` to start a doc comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118178/new/
https://reviews.llvm.org/D118178
More information about the cfe-commits
mailing list