diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-02-08 22:30:41 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-02-08 22:30:41 +0000 |
commit | 3f6f51e28231f65de9c2dd150a2d757b2162cfa3 (patch) | |
tree | 1e341c81fec0bf620086a1afa40f4f847dc5bdc4 /lib/Rewrite/Frontend/RewriteModernObjC.cpp | |
parent | 4a04d445af4d29440371800409babc98708d98aa (diff) |
Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.
Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/Frontend/RewriteModernObjC.cpp')
-rw-r--r-- | lib/Rewrite/Frontend/RewriteModernObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/lib/Rewrite/Frontend/RewriteModernObjC.cpp index ba5d669f08..34ffd22723 100644 --- a/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -16,6 +16,7 @@ #include "clang/AST/ASTConsumer.h" #include "clang/AST/Attr.h" #include "clang/AST/ParentMap.h" +#include "clang/Basic/CharInfo.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/SourceManager.h" @@ -2608,7 +2609,7 @@ Stmt *RewriteModernObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) { for (i=0; i < tmpName.length(); i++) { char c = tmpName.at(i); // replace any non alphanumeric characters with '_'. - if (!isalpha(c) && (c < '0' || c > '9')) + if (!isAlphanumeric(c)) tmpName[i] = '_'; } S += tmpName; |