History log of /external/clang/test/Preprocessor/ucn-pp-identifier.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/test/Preprocessor/ucn-pp-identifier.c
96e7813f08c6adf1d8657b0da86741b54e850fd7 04-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 'not' to commands that are expected to fail.

This is at least good documentation, but also opens the possibility of
using pipefail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/ucn-pp-identifier.c
dcceacb7f0085346164ac1dfb13f6f559533376b 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> Test fix-it ranges for Unicode characters.

Also, remove stray -fdiagnostics-parseable-fixits from ucn-pp-identifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/ucn-pp-identifier.c
b87672b124ab4fbe6f2cabc2ad71655fc71230ea 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> Add a fixit for \U1234 -> \u1234.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/ucn-pp-identifier.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/Preprocessor/ucn-pp-identifier.c