Argyrios Kyrtzidis | 785705b | 2016-01-16 00:20:02 +0000 | [diff] [blame] | 1 | // Test is line- and column-sensitive. Run lines are below. |
| 2 | |
| 3 | struct Foo { |
| 4 | int x = 10; |
| 5 | }; |
| 6 | |
| 7 | void foo() { |
| 8 | int p = 11; |
| 9 | } |
| 10 | |
| 11 | #define FUNC_MAC(x) x |
| 12 | |
| 13 | void goo() { |
| 14 | int p = FUNC_MAC(1); |
| 15 | int a = __LINE__; |
| 16 | } |
| 17 | |
Argyrios Kyrtzidis | 5dda112 | 2016-12-01 23:41:27 +0000 | [diff] [blame] | 18 | unsigned long long foo_int = 1ull << 60; |
| 19 | |
| 20 | unsigned long long HUGE = 1ull << 63; |
| 21 | |
| 22 | long long HUGE_NEG = -(1ll << 35); |
| 23 | |
Argyrios Kyrtzidis | 785705b | 2016-01-16 00:20:02 +0000 | [diff] [blame] | 24 | // RUN: c-index-test -evaluate-cursor-at=%s:4:7 \ |
| 25 | // RUN: -evaluate-cursor-at=%s:8:7 \ |
| 26 | // RUN: -evaluate-cursor-at=%s:8:11 -std=c++11 %s | FileCheck %s |
| 27 | // CHECK: Value: 10 |
| 28 | // CHECK: Value: 11 |
| 29 | // CHECK: Value: 11 |
| 30 | |
| 31 | // RUN: c-index-test -get-macro-info-cursor-at=%s:11:9 \ |
| 32 | // RUN: -get-macro-info-cursor-at=%s:14:11 \ |
| 33 | // RUN: -get-macro-info-cursor-at=%s:15:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-MACRO %s |
| 34 | // CHECK-MACRO: [function macro] |
| 35 | // CHECK-MACRO: [function macro] |
| 36 | // CHECK-MACRO: [builtin macro] |
Argyrios Kyrtzidis | 5dda112 | 2016-12-01 23:41:27 +0000 | [diff] [blame] | 37 | |
| 38 | // RUN: c-index-test -evaluate-cursor-at=%s:18:20 \ |
| 39 | // RUN: -evaluate-cursor-at=%s:20:20 \ |
| 40 | // RUN: -evaluate-cursor-at=%s:22:11 \ |
| 41 | // RUN: -std=c++11 %s | FileCheck -check-prefix=CHECK-LONG %s |
| 42 | // CHECK-LONG: unsigned, Value: 1152921504606846976 |
| 43 | // CHECK-LONG: unsigned, Value: 9223372036854775808 |
| 44 | // CHECK-LONG: Value: -34359738368 |