[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.
weiyi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 06:05:34 PDT 2022
wyt added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:252-255
+ // FIXME: The pointer values are indexed by the pointee types which are
+ // required to initialize the `PointeeLoc` field in `PointerValue`. Consider
+ // creating a type-independent `NullPointerValue` without a `PointeeLoc`
+ // field.
> Should we have a `PointerValue` without `PointeeLoc` to represent null pointers?
`PointeeLoc` is a reference field in the current `PointerValue` so it is required for now.
Creating an independent `NullPointerValue` class without `PointeeLoc` is something we are considering, but in this patch we will be using `PointerValues` with a `PointeeLoc` corresponding to the pointee type to represent null pointers.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits