This patch introduces transferBranch, which Applies the analysis
transfer function for a given edge from a CFG block of a conditional
statement.
RFC:
https://discourse.llvm.org/t/rfc-clang-dataflow-signanalysis-edgetransfer-branchtransfer/65220
Paths
| Differential D133698
[clang][dataflow] Implement transferBranch ClosedPublic Authored by martong on Sep 12 2022, 7:15 AM.
Details Summary This patch introduces transferBranch, which Applies the analysis RFC:
Diff Detail
Event Timeline
Comment Actions Aligned with the RFC, I am going to dissect this patch into two patches:
martong marked 8 inline comments as done. Comment Actions
martong retitled this revision from [clang][dataflow] SignAnalysis, edgeTransfer, branchTransfer to [clang][dataflow] Implement transferBranch.Oct 21 2022, 8:32 AM
Comment Actions Overall, looks quite good.
This revision now requires changes to proceed.Oct 25 2022, 8:33 AM
This revision is now accepted and ready to land.Oct 26 2022, 5:21 AM Closed by commit rGbb72d0dde29e: [clang][dataflow] Implement transferBranch (authored by martong). · Explain WhyOct 26 2022, 6:25 AM This revision was automatically updated to reflect the committed changes. martong marked an inline comment as done.
Comment Actions FWIW, it looks like this change broke the AIX bot: https://lab.llvm.org/buildbot/#/builders/214/builds/3932 Comment Actions
Yes, I've received many build bot failures complaining about the unused private field. I hope that I've fixed that in
Revision Contents
Diff 459451 clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp
clang/unittests/Analysis/FlowSensitive/TestingSupport.h
|
Please use CRTP (a non-virtual function here), and you'll need SFINAE to detect the presence of the overload of branchTransfer in branchTransferTypeErased.