diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-01-30 01:52:57 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-01-30 01:52:57 +0000 |
commit | 17441589c324f88c95e98c7e5d8d5e55cdd7c949 (patch) | |
tree | ab02a8bb2bf16030d81bed1f8e093fc974d19293 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 1105821f55d85c49040934eb842b25e124b01766 (diff) | |
download | bcm5719-llvm-17441589c324f88c95e98c7e5d8d5e55cdd7c949.tar.gz bcm5719-llvm-17441589c324f88c95e98c7e5d8d5e55cdd7c949.zip |
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>
llvm-svn: 173881
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index a7f0770ec7b..27f96b0974d 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -243,6 +243,8 @@ void CompilerInstance::createPreprocessor() { InitializePreprocessor(*PP, PPOpts, getHeaderSearchOpts(), getFrontendOpts()); + PP->setPreprocessedOutput(getPreprocessorOutputOpts().ShowCPP); + // Set up the module path, including the hash for the // module-creation options. SmallString<256> SpecificModuleCache( |