[llvm] r282350 - Add a comment on StringRef::contains(char)

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 24 21:06:39 PDT 2016


Author: zturner
Date: Sat Sep 24 23:06:39 2016
New Revision: 282350

URL: http://llvm.org/viewvc/llvm-project?rev=282350&view=rev
Log:
Add a comment on StringRef::contains(char)

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=282350&r1=282349&r2=282350&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Sat Sep 24 23:06:39 2016
@@ -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; }
 




More information about the llvm-commits mailing list