]> granicus.if.org Git - clang/commit
Driver: Include driver diagnostics when we --serialize-diagnostics
authorJustin Bogner <mail@justinbogner.com>
Thu, 23 Oct 2014 22:20:11 +0000 (22:20 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 23 Oct 2014 22:20:11 +0000 (22:20 +0000)
commitd881becaada015e075d658e63dee39262043898c
tree1b18f2f430e6b9bd0e9e57d621dc814fa4297194
parent7b842697f587f1dc7032bd90c8f873735e02988c
Driver: Include driver diagnostics when we --serialize-diagnostics

Currently, when --serialize-diagnostics is passed this only includes
the diagnostics from clang -cc1, and driver diagnostics are
dropped. This causes issues for tools that use the serialized
diagnostics, since stderr is lost and these diagnostics aren't seen at
all.

We handle this by merging the diagnostics from the CC1 process and the
driver diagnostics into a single file when the driver invokes CC1.

Fixes rdar://problem/10585062

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220525 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticFrontendKinds.td
include/clang/Basic/DiagnosticGroups.td
include/clang/Frontend/SerializedDiagnosticPrinter.h
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/SerializedDiagnosticPrinter.cpp
test/Misc/serialized-diags-driver.c [new file with mode: 0644]
tools/driver/driver.cpp