Skip to content

Commit 66b2c34

Browse files
[lldb] Clarify the documentation for GetIndexOfChildMemberWithName (#136633)
1 parent f556489 commit 66b2c34

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

lldb/include/lldb/Symbol/CompilerType.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,13 @@ class CompilerType {
450450
/// Lookup a child member given a name. This function will match member names
451451
/// only and will descend into "clang_type" children in search for the first
452452
/// member in this class, or any base class that matches "name".
453+
///
454+
/// \param child_indexes returns an index path for the result.
455+
/// \returns 0 if unsuccessful, otherwise the length of the index path.
456+
///
453457
/// TODO: Return all matches for a given name by returning a
454-
/// vector<vector<uint32_t>>
455-
/// so we catch all names that match a given child name, not just the first.
458+
/// vector<vector<uint32_t>> so we catch all names that match a
459+
/// given child name, not just the first.
456460
size_t
457461
GetIndexOfChildMemberWithName(llvm::StringRef name,
458462
bool omit_empty_base_classes,

lldb/include/lldb/Symbol/TypeSystem.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,18 +373,10 @@ class TypeSystem : public PluginInterface,
373373
bool &child_is_base_class, bool &child_is_deref_of_parent,
374374
ValueObject *valobj, uint64_t &language_flags) = 0;
375375

376-
// Lookup a child given a name. This function will match base class names and
377-
// member member names in "clang_type" only, not descendants.
378376
virtual uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
379377
llvm::StringRef name,
380378
bool omit_empty_base_classes) = 0;
381379

382-
// Lookup a child member given a name. This function will match member names
383-
// only and will descend into "clang_type" children in search for the first
384-
// member in this class, or any base class that matches "name".
385-
// TODO: Return all matches for a given name by returning a
386-
// vector<vector<uint32_t>>
387-
// so we catch all names that match a given child name, not just the first.
388380
virtual size_t GetIndexOfChildMemberWithName(
389381
lldb::opaque_compiler_type_t type, llvm::StringRef name,
390382
bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) = 0;

0 commit comments

Comments
 (0)