blob: 0d2ceb94d48be0823d5f157b44dbf9b1f6cb5d45 [file] [log] [blame]
Douglas Gregor4cd912a2010-10-12 00:50:20 +00001int *blah = 1;
2
3int
4
5// Test driver errors with code completion
6// RUN: c-index-test -code-completion-at=%s:4:1 -std= %s 2> %t | FileCheck -check-prefix=CHECK-RESULTS %s
7// RUN: FileCheck -check-prefix=CHECK-DIAGS %s < %t
8// CHECK-RESULTS: NotImplemented:{TypedText const} (30)
9// CHECK-RESULTS: NotImplemented:{TypedText restrict} (30)
10// CHECK-RESULTS: NotImplemented:{TypedText volatile} (30)
11
12// Test driver errors with parsing
13// RUN: c-index-test -test-load-source all -std= %s 2> %t | FileCheck -check-prefix=CHECK-LOAD %s
14// RUN: FileCheck -check-prefix=CHECK-DIAGS %s < %t
15// CHECK-LOAD: complete-driver-errors.c:1:6: VarDecl=blah:1:6
16
17// CHECK-DIAGS: error: invalid value '' in '-std='
18// CHECK-DIAGS: complete-driver-errors.c:1:6:{1:13-1:14}: warning: incompatible integer to pointer conversion initializing 'int *' with an expression of type 'int'
19// Test driver errors with code completion and precompiled preamble
20// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:4:1 -std= %s 2> %t | FileCheck -check-prefix=CHECK-RESULTS %s
21// RUN: FileCheck -check-prefix=CHECK-DIAGS %s < %t
22// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source all -std= %s 2> %t | FileCheck -check-prefix=CHECK-LOAD %s
23// RUN: FileCheck -check-prefix=CHECK-DIAGS %s < %t