projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4271d01
)
Add a comment on StringRef::contains(char)
author
Zachary Turner
<zturner@google.com>
Sun, 25 Sep 2016 04:06:39 +0000
(
04:06
+0000)
committer
Zachary Turner
<zturner@google.com>
Sun, 25 Sep 2016 04:06:39 +0000
(
04:06
+0000)
llvm-svn: 282350
llvm/include/llvm/ADT/StringRef.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/ADT/StringRef.h
b/llvm/include/llvm/ADT/StringRef.h
index
f6a348e
..
d3683c7
100644
(file)
--- 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; }