[PATCH] D46052: GNUstep Objective-C ABI version 2
Gabor Buella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 22 02:09:33 PDT 2018
GBuella added inline comments.
================
Comment at: lib/CodeGen/CGObjCGNU.cpp:1056
+ char c = Str[i];
+ if (isalpha(c) || isnumber(c))
+ StringName += c;
----------------
GBuella wrote:
> theraven wrote:
> > Ka-Ka wrote:
> > > The isnumber() function was added to cctype.h by Apple. I don't think it can be used in llvm.
> > >
> > > According to
> > > https://stackoverflow.com/questions/39204080/what-is-the-difference-between-isdigit-and-isnumber
> > >
> > Ah, isnumber is from 4.4BSD, I assumed it worked everywhere. Changing it to isdigit is fine.
> BTW `isalnum` is in ISO since 1989.
Also, you might want to `isalnum((unsigned char)c)`, as passing a negative value to these functions is UB.
Repository:
rC Clang
https://reviews.llvm.org/D46052
More information about the cfe-commits
mailing list