2010-07-27 07:54:23 +08:00
|
|
|
#include "prefix.h"
|
|
|
|
#include "preamble.h"
|
2013-08-08 05:17:33 +08:00
|
|
|
#include "preamble-with-error.h"
|
|
|
|
|
2010-07-27 07:54:23 +08:00
|
|
|
int wibble(int);
|
|
|
|
|
2010-08-10 04:45:32 +08:00
|
|
|
void f(int x) {
|
|
|
|
|
|
|
|
}
|
2010-08-13 13:36:37 +08:00
|
|
|
// RUN: c-index-test -write-pch %t.pch -x c-header %S/Inputs/prefix.h
|
2010-08-03 04:51:39 +08:00
|
|
|
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -I %S/Inputs -include %t %s 2> %t.stderr.txt | FileCheck %s
|
|
|
|
// RUN: FileCheck -check-prefix CHECK-DIAG %s < %t.stderr.txt
|
2011-03-08 16:55:46 +08:00
|
|
|
// CHECK: preamble.h:1:12: FunctionDecl=bar:1:12 (Definition) Extent=[1:1 - 6:2]
|
2011-10-06 03:00:14 +08:00
|
|
|
// CHECK: preamble.h:4:3: BinaryOperator= Extent=[4:3 - 4:13]
|
2010-08-04 03:06:41 +08:00
|
|
|
// CHECK: preamble.h:4:3: DeclRefExpr=ptr:2:8 Extent=[4:3 - 4:6]
|
|
|
|
// CHECK: preamble.h:4:9: UnexposedExpr=ptr1:3:10 Extent=[4:9 - 4:13]
|
|
|
|
// CHECK: preamble.h:4:9: DeclRefExpr=ptr1:3:10 Extent=[4:9 - 4:13]
|
2011-10-06 03:00:14 +08:00
|
|
|
// CHECK: preamble.h:5:10: IntegerLiteral= Extent=[5:10 - 5:11]
|
2013-08-08 05:17:33 +08:00
|
|
|
// CHECK: preamble.c:5:5: FunctionDecl=wibble:5:5 Extent=[5:1 - 5:16]
|
|
|
|
// CHECK: preamble.c:5:15: ParmDecl=:5:15 (Definition) Extent=[5:12 - 5:16]
|
2010-08-03 04:51:39 +08:00
|
|
|
// CHECK-DIAG: preamble.h:4:7:{4:9-4:13}: warning: incompatible pointer types assigning to 'int *' from 'float *'
|
2013-08-08 05:17:33 +08:00
|
|
|
// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:8:1 -I %S/Inputs -include %t %s 2> %t.stderr.txt | FileCheck -check-prefix CHECK-CC %s
|
2010-08-10 04:45:32 +08:00
|
|
|
// CHECK-CC: FunctionDecl:{ResultType int}{TypedText bar}{LeftParen (}{Placeholder int i}{RightParen )} (50)
|
2010-09-21 05:25:19 +08:00
|
|
|
// CHECK-CC: FunctionDecl:{ResultType void}{TypedText f}{LeftParen (}{Placeholder int x}{RightParen )} (50)
|
2010-08-10 04:45:32 +08:00
|
|
|
// CHECK-CC: FunctionDecl:{ResultType int}{TypedText foo}{LeftParen (}{Placeholder int}{RightParen )} (50)
|
|
|
|
// CHECK-CC: FunctionDecl:{ResultType int}{TypedText wibble}{LeftParen (}{Placeholder int}{RightParen )} (50)
|