This allows PointeeLoc to be empty in the case of nullptr.
Depends On D127745
Paths
| Differential D127746
[clang][dataflow] Convert `PointeeLoc` of `PointerValue` from reference to pointer. AbandonedPublic Authored by wyt on Jun 14 2022, 7:53 AM.
Details
Diff Detail
Event Timelineymandel retitled this revision from [clang][dataflow] Convert `PointeeLoc` of PointerValue from reference to pointer. This allows PointeeLoc to be empty in the case of `nullptr` to [clang][dataflow] Convert `PointeeLoc` of `PointerValue` from reference to pointer. .Jun 14 2022, 2:13 PM Comment Actions Overall, this seems to be an important API change, and I'm having trouble seeing the big picture here. I think it would be great if you could expand (in the CL description) on the motivation behind the change and the thinking behind the particular design choices you've made here. For example, you mentioned that this change supports explicit modeling of nullptr, but what is gained by this explicit modeling? Also, regarding the design choice itself: is the intent that native nullptr now represents an interpreted nullptr? If so, have you considered instead introducing an explicit NullptrLocation or the like and if so, what were the tradeoffs in this decision?
Revision Contents
Diff 436817 clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
clang/include/clang/Analysis/FlowSensitive/Value.h
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/lib/Analysis/FlowSensitive/Transfer.cpp
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
|
Please document the conditions under which these functions return nullptr.