From eedc8a4c8cb6a217bd8774abffe6d9e7dc6657ed Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Sun, 25 Sep 2016 04:06:39 +0000 Subject: [PATCH] Add a comment on StringRef::contains(char) llvm-svn: 282350 --- llvm/include/llvm/ADT/StringRef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h index f6a348e..d3683c7 100644 --- a/llvm/include/llvm/ADT/StringRef.h +++ b/llvm/include/llvm/ADT/StringRef.h @@ -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; } -- 2.7.4