[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:18:28 PDT 2025
================
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) {
return Str;
}
-CXStringSet *createSet(const std::vector<std::string> &Strings) {
+template <typename StringTy, bool Copy>
+static CXStringSet *createSetImpl(ArrayRef<StringTy> Strings) {
----------------
qiongsiwu wrote:
Ah yes this is good to keep in mind. I revised the call in `createSet` below to avoid explicitly constructing the `ArrayRef` so I think I will opt to keep the current implementation.
https://github.com/llvm/llvm-project/pull/136773
More information about the cfe-commits
mailing list