[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Misc / serialized-diags-driver.c
blobcadf0d864f28c4fc3fa4d5fd5d4ea562864f2af2
1 // Test that the driver correctly combines its own diagnostics with CC1's in the
2 // serialized diagnostics. To test this, we need to trigger diagnostics from
3 // both processes, so we compile code that has a warning (with an associated
4 // note) and then force the driver to crash. We compile stdin so that the crash
5 // doesn't litter the user's system with preprocessed output.
7 // RUN: rm -f %t
8 // RUN: %clang -Wx-typoed-warning -Wall -fsyntax-only --serialize-diagnostics %t.diag %s
9 // RUN: c-index-test -read-diagnostics %t.diag 2>&1 | FileCheck %s
11 // CHECK: warning: unknown warning option '-Wx-typoed-warning'
12 // CHECK-SAME: [-Wunknown-warning-option] []
14 // CHECK: warning: variable 'voodoo' is uninitialized when used here [-Wuninitialized]
15 // CHECK: note: initialize the variable 'voodoo' to silence this warning []
16 // CHECK: Number of diagnostics: 2
18 void foo(void) {
19 int voodoo;
20 voodoo = voodoo + 1;