[PATCH] Pull Lexer's CharInfo table out for general use throughout Clang

Jordan Rose jordan_rose at apple.com
Wed Feb 6 09:07:54 PST 2013

Comment at: include/clang/Basic/CharInfo.h:29
@@ +28,3 @@
+/// Returns true if this is an ASCII character.
+static inline bool isASCII(char c) {
Richard Smith wrote:
> Do these attributes make a measurable difference? 'static inline' is already a pretty big hint to inline, especially for a single-call-site function.
I didn't measure it at all; I just figured it wouldn't hurt and would keep people from directly accessing InfoTable unless they //really// needed it. I can easily take them out again.

Comment at: unittests/Basic/CharInfoTest.cpp:16-18
@@ +15,5 @@
+namespace {
+class CharInfoTest : public ::testing::Test {};
Dmitri Gribenko wrote:
> You don't really need this class and the namespace.  Just do `TEST(..., ...) {...`
Shows my unfamiliarity with gtest. Thanks, Dmitri!


More information about the cfe-commits mailing list