[clang] clang_EvalResult_getAsCXString impl (PR #134551)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 10:24:21 PDT 2025


================
@@ -52,6 +54,12 @@ typedef struct {
  * to `std::string::c_str()`.
  */
 CINDEX_LINKAGE const char *clang_getCString(CXString string);
+/**
+ * This function behaves the same as clang_getCString, except that it also
+ * returns the size through the length parameter. The length parameter should be
+ * non-NULL.
+ */
+CINDEX_LINKAGE const char *clang_getCString2(CXString string, size_t *length);
----------------
AaronBallman wrote:

`clang_getCString2` -> `clang_getCStringAndLength`?

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


More information about the cfe-commits mailing list