diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-28 06:00:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-28 06:00:51 +0000 |
commit | d93256e55673a17d18543397ec462416acb13792 (patch) | |
tree | 5b150fa660dcb777d022715e66051091d9bb9ffa /include/clang/Frontend/DiagnosticOptions.h | |
parent | a8d8fec7876666d90bb2a144d3b832b2d89a088a (diff) |
Introduce serialization and deserialization of diagnostic information
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().
The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/DiagnosticOptions.h')
-rw-r--r-- | include/clang/Frontend/DiagnosticOptions.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Frontend/DiagnosticOptions.h b/include/clang/Frontend/DiagnosticOptions.h index 13039bb506..b37c18057f 100644 --- a/include/clang/Frontend/DiagnosticOptions.h +++ b/include/clang/Frontend/DiagnosticOptions.h @@ -31,9 +31,12 @@ public: unsigned ShowOptionNames : 1; /// Show the diagnostic name for mappable /// diagnostics. unsigned ShowColors : 1; /// Show diagnostics with ANSI color sequences. - unsigned VerifyDiagnostics; /// Check that diagnostics match the expected + unsigned VerifyDiagnostics: 1; /// Check that diagnostics match the expected /// diagnostics, indicated by markers in the /// input source file. + unsigned BinaryOutput : 1; /// Emit diagnostics via the diagnostic + /// binary serialization mechanism, to be + /// deserialized by, e.g., the CIndex library. /// The distance between tab stops. unsigned TabStop; @@ -66,6 +69,7 @@ public: ShowOptionNames = 0; ShowSourceRanges = 0; VerifyDiagnostics = 0; + BinaryOutput = 0; } }; |