Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

78 lines
2.1 KiB
C++

// Test is line- and column-sensitive. Run lines are below.
struct Foo {
int x = 10;
};
void foo() {
int p = 11;
}
#define FUNC_MAC(x) x
void goo() {
int p = FUNC_MAC(1);
int a = __LINE__;
}
unsigned long long foo_int = 1ull << 60;
unsigned long long HUGE = 1ull << 63;
long long HUGE_NEG = -(1ll << 35);
template <typename d> class e {
using f = d;
static const auto g = alignof(f);
};
constexpr static int calc_val() { return 1 + 2; }
const auto the_value = calc_val() + sizeof(char);
void vlaTest() {
int msize = 4;
float arr[msize];
[&arr] {};
}
// 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
// CHECK: Value: 10
// CHECK: Value: 11
// CHECK: Value: 11
// RUN: c-index-test -get-macro-info-cursor-at=%s:11:9 \
// RUN: -get-macro-info-cursor-at=%s:14:11 \
// RUN: -get-macro-info-cursor-at=%s:15:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-MACRO %s
// 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
// RUN: c-index-test -evaluate-cursor-at=%s:18:20 \
// RUN: -evaluate-cursor-at=%s:20:20 \
// RUN: -evaluate-cursor-at=%s:26:21 \
// RUN: -std=c++11 %s | FileCheck -check-prefix=CHECK-DOES-NOT-CRASH %s
// CHECK-DOES-NOT-CRASH: Not Evaluatable
// RUN: c-index-test -evaluate-cursor-at=%s:30:1 \
// RUN: -evaluate-cursor-at=%s:30:32 \
// RUN: -evaluate-cursor-at=%s:30:35 \
// RUN: -evaluate-cursor-at=%s:30:37 -std=c++11 %s | FileCheck %s -check-prefix=CHECK-EXPR
// CHECK-EXPR: unsigned, Value: 4
// CHECK-EXPR: Value: 3
// CHECK-EXPR: unsigned, Value: 4
// CHECK-EXPR: unsigned, Value: 1
// RUN: c-index-test -evaluate-cursor-at=%s:35:5 \
// RUN: -std=c++11 %s | FileCheck -check-prefix=VLA %s
// VLA: Not Evaluatable