blob: 1b55c78be2e6fc20c7ecc7e5292c47e8dd02e7e4 [file] [log] [blame]
Douglas Gregor64538cf2010-04-06 15:09:27 +00001// Note: the run lines follow their respective tests, since line/column
2// matter in this test.
3
4int f(int);
5
6int test(int i, int j, int k, int l) {
7 return i | j | k & l;
8}
9
Douglas Gregord8e8a582010-05-25 21:41:55 +000010// RUN: c-index-test -code-completion-at=%s:7:9 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
Douglas Gregor12e13132010-05-26 22:00:08 +000011// CHECK-CC1: macro definition:{TypedText __VERSION__} (70)
Douglas Gregor5ac3bdb2010-05-30 01:49:25 +000012// CHECK-CC1: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (12)
Douglas Gregor4710e5b2010-05-28 00:49:12 +000013// CHECK-CC1-NOT: NotImplemented:{TypedText float} (40)
Douglas Gregor5ac3bdb2010-05-30 01:49:25 +000014// CHECK-CC1: ParmDecl:{ResultType int}{TypedText j} (2)
Douglas Gregor12e13132010-05-26 22:00:08 +000015// CHECK-CC1: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (30)
Douglas Gregor5ac3bdb2010-05-30 01:49:25 +000016// RUN: c-index-test -code-completion-at=%s:7:14 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s
17// CHECK-CC3: macro definition:{TypedText __VERSION__} (70)
18// CHECK-CC3: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50)
19// CHECK-CC3-NOT: NotImplemented:{TypedText float} (40)
20// CHECK-CC3: ParmDecl:{ResultType int}{TypedText j} (8)
21// CHECK-CC3: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expressio
22
23// RUN: c-index-test -code-completion-at=%s:7:18 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s
24// RUN: c-index-test -code-completion-at=%s:7:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s
Douglas Gregor4710e5b2010-05-28 00:49:12 +000025// RUN: c-index-test -code-completion-at=%s:7:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s
26// CHECK-CC2: macro definition:{TypedText __VERSION__} (70)
27// CHECK-CC2: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50)
28// CHECK-CC2: NotImplemented:{TypedText float} (40)
29// CHECK-CC2: ParmDecl:{ResultType int}{TypedText j} (8)
30// CHECK-CC2: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (30)