]> granicus.if.org Git - clang/commit
Introduce serialization and deserialization of diagnostic information
authorDouglas Gregor <dgregor@apple.com>
Thu, 28 Jan 2010 06:00:51 +0000 (06:00 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 28 Jan 2010 06:00:51 +0000 (06:00 +0000)
commitd93256e55673a17d18543397ec462416acb13792
tree5b150fa660dcb777d022715e66051091d9bb9ffa
parenta8d8fec7876666d90bb2a144d3b832b2d89a088a
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
15 files changed:
include/clang/Basic/Diagnostic.h
include/clang/Basic/DiagnosticFrontendKinds.td
include/clang/Basic/SourceManager.h
include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
include/clang/Frontend/DiagnosticOptions.h
lib/Basic/Diagnostic.cpp
lib/Driver/Tools.cpp
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
test/Index/code-complete-errors.c [new file with mode: 0644]
tools/CIndex/CIndex.cpp
tools/CIndex/CIndexCodeCompletion.cpp
tools/CIndex/CIndexDiagnostic.cpp
tools/CIndex/CIndexDiagnostic.h