From 6b930967e88029e9c7ce1b1c4234042b5983ad63 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 3 May 2013 22:58:43 +0000 Subject: When building a module, forward diagnostics to the outer diagnostic consumer. Previously, we would clone the current diagnostic consumer to produce a new diagnostic consumer to use when building a module. The problem here is that we end up losing diagnostics for important diagnostic consumers, such as serialized diagnostics (where we'd end up with two diagnostic consumers writing the same output file). With forwarding, the diagnostics from all of the different modules being built get forwarded to the one serialized-diagnostic consumer and are emitted in a sane way. Fixes . llvm-svn: 181067 --- clang/test/Modules/Inputs/ModuleDiags/has_warnings.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 clang/test/Modules/Inputs/ModuleDiags/has_warnings.h (limited to 'clang/test/Modules/Inputs/ModuleDiags/has_warnings.h') diff --git a/clang/test/Modules/Inputs/ModuleDiags/has_warnings.h b/clang/test/Modules/Inputs/ModuleDiags/has_warnings.h new file mode 100644 index 00000000000..87112be6952 --- /dev/null +++ b/clang/test/Modules/Inputs/ModuleDiags/has_warnings.h @@ -0,0 +1,3 @@ + +int int_val; +float *float_ptr = &int_val; -- cgit v1.2.3