blob: 5149132b7fcec25d66c09dfe3cc1c9d713ddfbb2 [file] [log] [blame]
Ted Kremeneka7e8a832011-11-11 00:46:43 +00001void foo() {
2 int voodoo;
3 voodoo = voodoo + 1;
4}
5
6void bar() {
7 int dragon;
8 dragon = dragon + 1
9}
10
NAKAMURA Takumi6edae592011-11-11 05:12:45 +000011// RUN: rm -f %t
Ted Kremeneka7e8a832011-11-11 00:46:43 +000012// RUN: %clang -Wall -fsyntax-only %s --serialize-diagnostics %t 2>&1 /dev/null || true
13// RUN: c-index-test -read-diagnostics %t 2>&1 | FileCheck %s
Ted Kremeneka7e8a832011-11-11 00:46:43 +000014
15// This test case tests that we can handle multiple diagnostics which contain
16// FIXITs at different levels (one at the note, another at the main diagnostic).
17
NAKAMURA Takumi6edae592011-11-11 05:12:45 +000018// CHECK: {{.*[/\\]}}serialized-diags.c:3:12: warning: variable 'voodoo' is uninitialized when used here [-Wuninitialized]
19// CHECK: Range: {{.*[/\\]}}serialized-diags.c:3:12 {{.*[/\\]}}serialized-diags.c:3:18
20// CHECK: +-{{.*[/\\]}}serialized-diags.c:2:13: note: initialize the variable 'voodoo' to silence this warning []
21// CHECK: +-FIXIT: ({{.*[/\\]}}serialized-diags.c:2:13 - {{.*[/\\]}}serialized-diags.c:2:13): " = 0Parse Issueexpected ';' after expression"
22// CHECK: {{.*[/\\]}}serialized-diags.c:8:22: error: expected ';' after expression []
23// CHECK: FIXIT: ({{.*[/\\]}}serialized-diags.c:8:22 - {{.*[/\\]}}serialized-diags.c:8:22): ";"