llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: iseki (iseki0)

<details>
<summary>Changes</summary>

Emmm... Maybe I'm splitting hairs. But I really think the paragraph should be 
more detailed. The orginal document makes me confused. Do I take the ownership 
of the string data? 
Here I don't refer the `clang_disposeString` function, because here's a 
`clang_disposeStringSet`. 

---
Full diff: https://github.com/llvm/llvm-project/pull/119090.diff


1 Files Affected:

- (modified) clang/include/clang-c/CXString.h (+3) 


``````````diff
diff --git a/clang/include/clang-c/CXString.h b/clang/include/clang-c/CXString.h
index f117010c71a462..27375913e4cc19 100644
--- a/clang/include/clang-c/CXString.h
+++ b/clang/include/clang-c/CXString.h
@@ -46,6 +46,9 @@ typedef struct {
 
 /**
  * Retrieve the character data associated with the given string.
+ *
+ * The caller shouldn't free the returned string data, and the returned string
+ * data shouldn't be accessed after the \c CXString disposed.
  */
 CINDEX_LINKAGE const char *clang_getCString(CXString string);
 

``````````

</details>


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

Reply via email to