[Lldb-commits] [PATCH] D134846: [NFC] Add header documentation to the SBError::GetCString() to clarify ownwership of the returned string.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 28 17:34:21 PDT 2022


clayborg created this revision.
clayborg added reviewers: labath, JDevlieghere, jingham, yinghuitan.
Herald added a subscriber: yaxunl.
Herald added a project: All.
clayborg requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Title says it all!


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134846

Files:
  lldb/include/lldb/API/SBError.h


Index: lldb/include/lldb/API/SBError.h
===================================================================
--- lldb/include/lldb/API/SBError.h
+++ lldb/include/lldb/API/SBError.h
@@ -27,6 +27,10 @@
 
   const SBError &operator=(const lldb::SBError &rhs);
 
+  /// Get the error string as a NULL terminated UTF8 c-string.
+  ///
+  /// This SBError object owns the returned string and this object must be kept
+  /// around long enough to use the returned string.
   const char *GetCString() const;
 
   void Clear();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134846.463730.patch
Type: text/x-patch
Size: 517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220929/7b561006/attachment.bin>


More information about the lldb-commits mailing list