[llvm] 99a37ae - [ADT][NFC] Fix documentation for arrayRefFromStringRef (#203430)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 09:29:06 PDT 2026


Author: Quentin
Date: 2026-06-12T16:29:01Z
New Revision: 99a37aedebd7c69680e74ac83769a11eaefef1e7

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

LOG: [ADT][NFC] Fix documentation for arrayRefFromStringRef (#203430)

The documentation was describing the opposite behavior of what it does.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/StringExtras.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/StringExtras.h b/llvm/include/llvm/ADT/StringExtras.h
index 017859d3d8c3c..e3cc6dcb25755 100644
--- a/llvm/include/llvm/ADT/StringExtras.h
+++ b/llvm/include/llvm/ADT/StringExtras.h
@@ -63,7 +63,7 @@ inline StringRef toStringRef(ArrayRef<char> Input) {
   return StringRef(Input.begin(), Input.size());
 }
 
-/// Construct a string ref from an array ref of unsigned chars.
+/// Construct an array ref of bytes from a string ref.
 template <class CharT = uint8_t>
 inline ArrayRef<CharT> arrayRefFromStringRef(StringRef Input) {
   static_assert(std::is_same<CharT, char>::value ||


        


More information about the llvm-commits mailing list