[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)
Qiongsi Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 10:49:32 PDT 2025
qiongsiwu wrote:
> > > Where is this new API expected to be used?
> >
> >
> > An intended use can be found here [swiftlang#10524](https://github.com/swiftlang/llvm-project/pull/10524), where we try to pass up a collection of strings to the user, and we try not to create copies of the strings.
>
> Okay, thanks! Given there are no in-tree uses, this really needs some test coverage so nobody comes along and removes the API as being unused (it's part of the internal APIs, not the external ones).
Ah good point! Makes sense to me. I did not find a straightforward place to piggy-back on to add a test (e.g. the c-index tests do not seem quite fitting). I will go find a way to add a unit test. Does this sound reasonable? Adding a unit test also feels a bit weird, since I am not seeing that we test for c interfaces in clang unit tests at a glance, but I might be missing some examples when looking.
https://github.com/llvm/llvm-project/pull/136773
More information about the cfe-commits
mailing list