Add a comment on StringRef::contains(char)
authorZachary Turner <zturner@google.com>
Sun, 25 Sep 2016 04:06:39 +0000 (04:06 +0000)
committerZachary Turner <zturner@google.com>
Sun, 25 Sep 2016 04:06:39 +0000 (04:06 +0000)
llvm-svn: 282350

llvm/include/llvm/ADT/StringRef.h

index f6a348e..d3683c7 100644 (file)
@@ -379,6 +379,8 @@ namespace llvm {
     LLVM_ATTRIBUTE_ALWAYS_INLINE
     bool contains(StringRef Other) const { return find(Other) != npos; }
 
+    /// Return true if the given character is contained in *this, and false
+    /// otherwise.
     LLVM_ATTRIBUTE_ALWAYS_INLINE
     bool contains(char C) const { return find_first_of(C) != npos; }