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

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 29 10:54:42 PDT 2022


Author: Greg Clayton
Date: 2022-09-29T10:54:31-07:00
New Revision: b3a0bed5fb8766dcf27583ab1f73edc6e7232657

URL: https://github.com/llvm/llvm-project/commit/b3a0bed5fb8766dcf27583ab1f73edc6e7232657
DIFF: https://github.com/llvm/llvm-project/commit/b3a0bed5fb8766dcf27583ab1f73edc6e7232657.diff

LOG: [NFC] Add header documentation to the SBError::GetCString() to clarify ownwership of the returned string.

Title says it all!

Differential Revision: https://reviews.llvm.org/D134846

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/API/SBError.h b/lldb/include/lldb/API/SBError.h
index b34014aecc441..30214e37c8e5c 100644
--- a/lldb/include/lldb/API/SBError.h
+++ b/lldb/include/lldb/API/SBError.h
@@ -27,6 +27,10 @@ class LLDB_API SBError {
 
   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();


        


More information about the lldb-commits mailing list