History log of /external/clang/test/Lexer/utf8-invalid.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0ed439487491e09faffdbabfacb1d050292c7723 31-Jan-2013 Jordan Rose <jordan_rose@apple.com> Lexer: Don't warn about Unicode in preprocessor directives.

This allows people to use Unicode in their #pragma mark and in macros
that exist only to be string-ized.

<rdar://problem/13107323&13121362>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Lexer/utf8-invalid.c
1b6b31db169b66fb2048012b0ec1550c22cc64f4 30-Jan-2013 Jordan Rose <jordan_rose@apple.com> Fix comment in test/Lexer/utf8-invalid.c for updates in r173959.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Lexer/utf8-invalid.c
20afc2977cd0a6bacbe6218a633cd59a24463e2f 30-Jan-2013 Jordan Rose <jordan_rose@apple.com> Fix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.

This caused hangs as we processed the same invalid byte over and over.

<rdar://problem/13115651>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Lexer/utf8-invalid.c
c7629d941557f7179eb8fa8a2e2a74d749cbaf7c 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> Handle universal character names and Unicode characters outside of literals.

This is a missing piece for C99 conformance.

This patch handles UCNs by adding a '\\' case to LexTokenInternal and
LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.
If the UCN is not syntactically well-formed, we fall back to the old
treatment: a backslash followed by an identifier beginning with 'u' (or 'U').

Because the spelling of an identifier with UCNs still has the UCN in it, we
need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.

Of course, valid code that does *not* use UCNs will see only a very minimal
performance hit (checks after each identifier for non-ASCII characters,
checks when converting raw_identifiers to identifiers that they do not
contain UCNs, and checks when getting the spelling of an identifier that it
does not contain a UCN).

This patch also adds basic support for actual UTF-8 in the source. This is
treated almost exactly the same as UCNs except that we consider stray
Unicode characters to be mistakes and offer a fixit to remove them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Lexer/utf8-invalid.c