Skip to content

Commit 739b10a

Browse files
bazuzigithub-actions[bot]
authored andcommitted
Automerge: [clang][dataflow] Expose simple access to child StorageLocation presence. (#145520)
`getChild` does not offer this knowledge, and a map lookup is significantly cheaper than iteration over `children()`.
2 parents f6c7378 + 09b43a5 commit 739b10a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/include/clang/Analysis/FlowSensitive/StorageLocation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ class RecordStorageLocation final : public StorageLocation {
168168
return {Children.begin(), Children.end()};
169169
}
170170

171+
bool hasChild(const ValueDecl &D) const { return Children.contains(&D); }
172+
171173
private:
172174
FieldToLoc Children;
173175
SyntheticFieldMap SyntheticFields;

0 commit comments

Comments
 (0)