[llvm] r267831 - Fix bogus documentation for StringRef::slice in the End < Start case.

Richard Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 17:57:14 PDT 2016


Author: rsmith
Date: Wed Apr 27 19:57:14 2016
New Revision: 267831

URL: http://llvm.org/viewvc/llvm-project?rev=267831&view=rev
Log:
Fix bogus documentation for StringRef::slice in the End < Start case.

Modified:
    llvm/trunk/include/llvm/ADT/StringRef.h

Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=267831&r1=267830&r2=267831&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Wed Apr 27 19:57:14 2016
@@ -446,9 +446,10 @@ namespace llvm {
     /// empty substring will be returned.
     ///
     /// \param End The index following the last character to include in the
-    /// substring. If this is npos, or less than \p Start, or exceeds the
-    /// number of characters remaining in the string, the string suffix
-    /// (starting with \p Start) will be returned.
+    /// substring. If this is npos or exceeds the number of characters
+    /// remaining in the string, the string suffix (starting with \p Start)
+    /// will be returned. If this is less than \p Start, an empty string will
+    /// be returned.
     LLVM_ATTRIBUTE_ALWAYS_INLINE
     StringRef slice(size_t Start, size_t End) const {
       Start = std::min(Start, Length);




More information about the llvm-commits mailing list