Skip to content

Commit

Permalink
Fix bogus documentation for StringRef::slice in the End < Start case.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267831 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zygoloid committed Apr 28, 2016
1 parent b75c7f8 commit b012212
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/llvm/ADT/StringRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b012212

Please sign in to comment.