[clang] [clang][dataflow] Expose simple access to child StorageLocation presence. (PR #145520)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 00:45:30 PDT 2025
martinboehme wrote:
Can you explain what this is intended to be used for? I'd like to make sure we don't have an XY problem here.
Whether a `RecordStorageLocation` has a given child or not should always be very predictable, as we enforce the [constraint](https://github.com/llvm/llvm-project/blob/aeaf319b8c2207eb747079529f28d44d54bf1fd5/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp#L94) that a `RecordStorageLocation` should always have exactly the fields returned by `getModeledFields()`. There shouldn't, therefore, ever really be a need to check whether a `RecordStorageLocation` has a given child -- and I'm worried that maybe you've run into a bug that you're using `getChild()` to work around, when in fact it would be better to fix the underlying bug.
https://github.com/llvm/llvm-project/pull/145520
More information about the cfe-commits
mailing list