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 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 24 template <typename d> class e { 25 using f = d; 26 static const auto g = alignof(f); 27 }; 28 29 // RUN: c-index-test -evaluate-cursor-at=%s:4:7 \ 30 // RUN: -evaluate-cursor-at=%s:8:7 \ 31 // RUN: -evaluate-cursor-at=%s:8:11 -std=c++11 %s | FileCheck %s 32 // CHECK: Value: 10 33 // CHECK: Value: 11 34 // CHECK: Value: 11 35 36 // RUN: c-index-test -get-macro-info-cursor-at=%s:11:9 \ 37 // RUN: -get-macro-info-cursor-at=%s:14:11 \ 38 // RUN: -get-macro-info-cursor-at=%s:15:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-MACRO %s 39 // CHECK-MACRO: [function macro] 40 // CHECK-MACRO: [function macro] 41 // CHECK-MACRO: [builtin macro] 42 43 // RUN: c-index-test -evaluate-cursor-at=%s:18:20 \ 44 // RUN: -evaluate-cursor-at=%s:20:20 \ 45 // RUN: -evaluate-cursor-at=%s:22:11 \ 46 // RUN: -std=c++11 %s | FileCheck -check-prefix=CHECK-LONG %s 47 // CHECK-LONG: unsigned, Value: 1152921504606846976 48 // CHECK-LONG: unsigned, Value: 9223372036854775808 49 // CHECK-LONG: Value: -34359738368 50 51 // RUN: c-index-test -evaluate-cursor-at=%s:18:20 \ 52 // RUN: -evaluate-cursor-at=%s:20:20 \ 53 // RUN: -evaluate-cursor-at=%s:26:21 \ 54 // RUN: -std=c++11 %s | FileCheck -check-prefix=CHECK-DOES-NOT-CRASH %s 55 // CHECK-DOES-NOT-CRASH: Not Evaluatable 56