]> granicus.if.org Git - clang/commit
Don't warn about Unicode characters in -E mode.
authorJordan Rose <jordan_rose@apple.com>
Wed, 30 Jan 2013 01:52:57 +0000 (01:52 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 30 Jan 2013 01:52:57 +0000 (01:52 +0000)
commit74c2498bb9e339345ee32bdd095e76157cec3b86
treea4a11f90fae4b7d414c45a79e74a0a2809721f1f
parentd9bf41893c3a59d5ea33e7b04b0e6211f7dca201
Don't warn about Unicode characters in -E mode.

People use the C preprocessor for things other than C files. Some of them
have Unicode characters. We shouldn't warn about Unicode characters
appearing outside of identifiers in this case.

There's not currently a way for the preprocessor to tell if it's in -E mode,
so I added a new flag, derived from the PreprocessorOutputOptions. This is
only used by the Unicode warnings for now, but could conceivably be used by
other warnings or even behavioral differences later.

<rdar://problem/13107323>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173881 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Frontend/PreprocessorOutputOptions.h
include/clang/Lex/Preprocessor.h
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Lex/Lexer.cpp
test/Lexer/unicode.c