[PATCH] D133931: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `clang/Analysis/FlowSensitive`.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 15 07:24:40 PDT 2022
martong added inline comments.
================
Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:137-140
+ auto CS = E->getAs<CFGStmt>();
+ if (!CS)
+ return;
+ auto S = CS->getStmt();
----------------
This is exactly the same code that you have in `SingleVarConstantPropagationTest.cpp` and in the rest of the files. I think this could be hoisted into a common function declared in `FlowSensitive/DataflowAnalysis.h`.
By the way, wouldn't it be more convenient for the client to provide a `transferStmt` function if the they are interested only in `Stmt`s? (Defining both `transferStmt` and `transfer` should be a compile time error)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133931/new/
https://reviews.llvm.org/D133931
More information about the cfe-commits
mailing list