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:
45d0a26
)
[objc-gnustep2] Use unsigned char to avoid potential UB in isalnum.
author
David Chisnall
<csdavec@swan.ac.uk>
Tue, 22 May 2018 10:13:17 +0000
(10:13 +0000)
committer
David Chisnall
<csdavec@swan.ac.uk>
Tue, 22 May 2018 10:13:17 +0000
(10:13 +0000)
Suggested by Gabor Buella.
llvm-svn: 332966
clang/lib/CodeGen/CGObjCGNU.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CGObjCGNU.cpp
b/clang/lib/CodeGen/CGObjCGNU.cpp
index
1c1abe9
..
6a0554b
100644
(file)
--- a/
clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/
clang/lib/CodeGen/CGObjCGNU.cpp
@@
-1053,7
+1053,7
@@
class CGObjCGNUstep2 : public CGObjCGNUstep {
if (isNamed) {
StringName = ".objc_str_";
for (int i=0,e=Str.size() ; i<e ; ++i) {
- char c = Str[i];
+
unsigned
char c = Str[i];
if (isalnum(c))
StringName += c;
else if (c == ' ')