]> granicus.if.org Git - clang/blobdiff - test/Index/evaluate-cursor.cpp
[libclang] Add APIs to check the result of an integer expression in CXEvalResult...
[clang] / test / Index / evaluate-cursor.cpp
index 28a9c368795abd496b7d03637a059a7829e0a8c4..39fc9db98a3ef4fc733a2007f75f87c1670f1e6a 100644 (file)
@@ -15,6 +15,12 @@ void goo() {
   int a = __LINE__;
 }
 
+unsigned long long foo_int = 1ull << 60;
+
+unsigned long long HUGE = 1ull << 63;
+
+long long HUGE_NEG = -(1ll << 35);
+
 // RUN: c-index-test -evaluate-cursor-at=%s:4:7 \
 // RUN:    -evaluate-cursor-at=%s:8:7 \
 // RUN:    -evaluate-cursor-at=%s:8:11 -std=c++11 %s | FileCheck %s
@@ -28,3 +34,11 @@ void goo() {
 // CHECK-MACRO: [function macro]
 // CHECK-MACRO: [function macro]
 // CHECK-MACRO: [builtin macro]
+
+// RUN: c-index-test -evaluate-cursor-at=%s:18:20 \
+// RUN:    -evaluate-cursor-at=%s:20:20 \
+// RUN:    -evaluate-cursor-at=%s:22:11 \
+// RUN:    -std=c++11 %s | FileCheck -check-prefix=CHECK-LONG %s
+// CHECK-LONG: unsigned, Value: 1152921504606846976
+// CHECK-LONG: unsigned, Value: 9223372036854775808
+// CHECK-LONG: Value: -34359738368