From: Zachary Turner Date: Sun, 25 Sep 2016 04:06:39 +0000 (+0000) Subject: Add a comment on StringRef::contains(char) X-Git-Tag: llvmorg-4.0.0-rc1~8969 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eedc8a4c8cb6a217bd8774abffe6d9e7dc6657ed;p=platform%2Fupstream%2Fllvm.git Add a comment on StringRef::contains(char) llvm-svn: 282350 --- 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; }