1// RUN: rm -f %t
2// RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1
3// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s
4
5// RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s
6
7int foo() {
8  // CHECK: serialized-diags-stable.c:[[@LINE+2]]:1: warning: control reaches end of non-void function [-Wreturn-type] [Semantic Issue]
9  // CHECK-NEXT: Number FIXITs = 0
10}
11
12// CHECK: serialized-diags-stable.c:[[@LINE+5]]:13: error: redefinition of 'bar' as different kind of symbol [] [Semantic Issue]
13// CHECK-NEXT: Number FIXITs = 0
14// CHECK-NEXT: +-{{.*}}serialized-diags-stable.c:[[@LINE+2]]:6: note: previous definition is here [] []
15// CHECK-NEXT: Number FIXITs = 0
16void bar() {}
17typedef int bar;
18
19
20// CHECK-LABEL: Number of diagnostics: 2
21