• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Test is line- and column-sensitive. Run lines are below.
2 
3 struct Foo {
4   int x = 10;
5 };
6 
foo()7 void foo() {
8   int p = 11;
9 }
10 
11 #define FUNC_MAC(x) x
12 
goo()13 void goo() {
14   int p = FUNC_MAC(1);
15   int a = __LINE__;
16 }
17 
18 // RUN: c-index-test -evaluate-cursor-at=%s:4:7 \
19 // RUN:    -evaluate-cursor-at=%s:8:7 \
20 // RUN:    -evaluate-cursor-at=%s:8:11 -std=c++11 %s | FileCheck %s
21 // CHECK: Value: 10
22 // CHECK: Value: 11
23 // CHECK: Value: 11
24 
25 // RUN: c-index-test -get-macro-info-cursor-at=%s:11:9 \
26 // RUN:    -get-macro-info-cursor-at=%s:14:11 \
27 // RUN:    -get-macro-info-cursor-at=%s:15:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-MACRO %s
28 // CHECK-MACRO: [function macro]
29 // CHECK-MACRO: [function macro]
30 // CHECK-MACRO: [builtin macro]
31