~shimon/dismaltc

ref: 1ed81693aae22a7be0136e601ee14b226cce74d4 dismaltc/clang/test/Misc/serialized-diags-stable.c -rw-r--r-- 831 bytes
1ed81693Itoh Shimon oops, re-enabled more tests. 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: rm -f %t
// RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1
// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s

// RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s

int foo() {
  // CHECK: serialized-diags-stable.c:[[@LINE+2]]:1: warning: control reaches end of non-void function [-Wreturn-type] [Semantic Issue]
  // CHECK-NEXT: Number FIXITs = 0
}

// CHECK: serialized-diags-stable.c:[[@LINE+5]]:13: error: redefinition of 'bar' as different kind of symbol [] [Semantic Issue]
// CHECK-NEXT: Number FIXITs = 0
// CHECK-NEXT: +-{{.*}}serialized-diags-stable.c:[[@LINE+2]]:6: note: previous definition is here [] []
// CHECK-NEXT: Number FIXITs = 0
void bar() {}
typedef int bar;


// CHECK-LABEL: Number of diagnostics: 2