projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6925f50
)
Guard for empty strings in CStrInCStrNoCase.
author
Ted Kremenek
<kremenek@apple.com>
Wed, 7 May 2008 18:49:31 +0000
(18:49 +0000)
committer
Ted Kremenek
<kremenek@apple.com>
Wed, 7 May 2008 18:49:31 +0000
(18:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50823
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/StringExtras.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/StringExtras.h
b/include/llvm/ADT/StringExtras.h
index 9a3e1b51595cc41da8171752540761fa38b84f3e..e3b3c8770a24abbdd97ac498da296c4e22112f31 100644
(file)
--- a/
include/llvm/ADT/StringExtras.h
+++ b/
include/llvm/ADT/StringExtras.h
@@
-147,8
+147,8
@@
static inline bool StringsEqualNoCase(const std::string &LHS,
/// NULL if 's1' cannot be found.
static inline const char* CStrInCStrNoCase(const char *s1, const char *s2) {
- // Are either strings NULL?
- if (!s1 || !s2)
+ // Are either strings NULL
or empty
?
+ if (!s1 || !s2
|| s1[0] == '\0' || s2[0] == '\0'
)
return 0;
const char *I1=s1, *I2=s2;