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 | 74c2498bb9e339345ee32bdd095e76157cec3b86 (patch) | |
tree | a4a11f90fae4b7d414c45a79e74a0a2809721f1f /lib/Frontend/CompilerInstance.cpp | |
parent | d9bf41893c3a59d5ea33e7b04b0e6211f7dca201 (diff) |
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
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index a7f0770ec7..27f96b0974 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/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( |