[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 24 03:48:02 PDT 2025


AaronBallman wrote:

> Hi @AaronBallman ! Again I appreciate your suggestion. I ran into some complexities when adding a test. It is precisely that this is a very internal API that is giving me some trouble. Since `clang/tools/libclang/CXString.h` is not an exposed header, I cannot really even add it to the clang unit tests, unless I expose (some of) the header's content through a more public API (not necessarily the C-APIs).
> 
> Do you have suggestions other than landing this PR as is? One possible alternative is to move `clang/tools/libclang/CXString.h` into a directory in `clang/include/clang/`, and then we can add the unit test. The problem with this alternative is that it seems to be too big a change for what we are aiming for here.

If the only use is in a downstream of Clang, do we need to upstream the changes at all? We could always upstream once there's an in-tree need for the functionality.

https://github.com/llvm/llvm-project/pull/136773


More information about the cfe-commits mailing list