charles-zablit wrote:

> I think the test can just do this:
> 
> ```
>       uint64_t bit_offset;
>       std::string name;
>       field_type = field_type.GetFieldAtIndex(
>               field_type.GetIndexOfChildWithName(field_name, 
> /*omit_empty_base_classes=*/false),
>               name, &bit_offset, nullptr, nullptr);
>       ASSERT_TRUE(field_type);
> ```

Tested this locally and the tests pass, I have updated the commit.

> Instead of using `CompilerType::GetIndexOfFieldWithName` (though I haven't 
> actually tried to compile/run this)
> 
> Don't have a strong opinion on whether to remove or extend the API. 
> Personally I prefer removing it just because we already have so many 
> similarly named APIs across CompilerType/TypeSystemClang that do things 
> slightly differently, that it would be nice to get rid of at least one of 
> them.

Ended up removing the API and used your suggestion to define the test without 
the API. Thanks!



https://github.com/llvm/llvm-project/pull/135963
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to