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
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
// REQUIRES: host-supports-jit
|
|
// RUN: cat %s | clang-repl -Xcc -Xclang -Xcc -verify | FileCheck %s
|
|
// RUN: %clang_cc1 -verify -fincremental-extensions -emit-llvm -o - %s \
|
|
// RUN: | FileCheck --check-prefix=CODEGEN-CHECK %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
//CODEGEN-CHECK-COUNT-2: define internal void @__stmts__
|
|
//CODEGEN-CHECK-NOT: define internal void @__stmts__
|
|
|
|
extern "C" int printf(const char*,...);
|
|
|
|
template <typename T> T call() { printf("called\n"); return T(); }
|
|
call<int>();
|
|
// CHECK: called
|
|
|
|
int i = 1;
|
|
++i;
|
|
printf("i = %d\n", i);
|
|
// CHECK: i = 2
|
|
|
|
namespace Ns { void f(){ i++; } }
|
|
Ns::f();
|
|
|
|
void g() { ++i; }
|
|
g();
|
|
::g();
|
|
|
|
printf("i = %d\n", i);
|
|
// CHECK-NEXT: i = 5
|
|
|
|
for (; i > 4; --i) printf("i = %d\n", i);
|
|
// CHECK-NEXT: i = 5
|
|
|
|
{++i;}
|
|
|
|
for (; i > 4; --i) { printf("i = %d\n", i); };
|
|
// CHECK-NEXT: i = 5
|
|
|
|
int j = i; printf("j = %d\n", j);
|
|
// CHECK-NEXT: j = 4
|
|
|
|
{i = 0; printf("i = %d (global scope)\n", i);}
|
|
// CHECK-NEXT: i = 0
|
|
|
|
while (int i = 1) { printf("i = %d (while condition)\n", i--); break; }
|
|
// CHECK-NEXT: i = 1
|
|
|
|
if (int i = 2) printf("i = %d (if condition)\n", i);
|
|
// CHECK-NEXT: i = 2
|
|
|
|
switch (int i = 3) { default: printf("i = %d (switch condition)\n", i); }
|
|
// CHECK-NEXT: i = 3
|
|
|
|
for (int i = 4; i > 3; --i) printf("i = %d (for-init)\n", i);
|
|
// CHECK-NEXT: i = 4
|
|
|
|
for (const auto &i : "5") printf("i = %c (range-based for-init)\n", i);
|
|
// CHECK-NEXT: i = 5
|
|
|
|
int *aa=nullptr;
|
|
if (auto *b=aa) *b += 1;
|
|
while (auto *b=aa) ;
|
|
for (auto *b=aa; b; *b+=1) ;
|