summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2018-05-22 10:13:17 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2018-05-22 10:13:17 +0000
commit48a7afa5a1d60cd415fce313fc39e0aa739c79b3 (patch)
treec7c7b6006703c3d92975bc22e6ee31c8c687b901 /clang
parent45d0a2650e15cea12aa58158ff946c4cd54c33a1 (diff)
downloadbcm5719-llvm-48a7afa5a1d60cd415fce313fc39e0aa739c79b3.tar.gz
bcm5719-llvm-48a7afa5a1d60cd415fce313fc39e0aa739c79b3.zip
[objc-gnustep2] Use unsigned char to avoid potential UB in isalnum.
Suggested by Gabor Buella. llvm-svn: 332966
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 1c1abe90c61..6a0554b46b1 100644
--- 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 == ' ')
OpenPOWER on IntegriCloud