]> granicus.if.org Git - clang/commit
Pull Lexer's CharInfo table out for general use throughout Clang.
authorJordan Rose <jordan_rose@apple.com>
Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)
commit9893902eceba7f01dd1521349d33866f77254d78
tree663def75b1c867719f47927560893f869a761668
parente22cef5cb2e460bae88563cfc5fcf98d742d6215
Pull Lexer's CharInfo table out for general use throughout Clang.

Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).

The next commit will try to clean up uses of <ctype.h> functions within Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174765 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/CharInfo.h [new file with mode: 0644]
lib/Basic/CMakeLists.txt
lib/Basic/CharInfo.cpp [new file with mode: 0644]
lib/Lex/Lexer.cpp
unittests/Basic/CMakeLists.txt
unittests/Basic/CharInfoTest.cpp [new file with mode: 0644]