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
53 lines
2.6 KiB
C++
53 lines
2.6 KiB
C++
|
|
|
|
|
|
|
|
#define COND1 (a == b)
|
|
#define COND2 (a != b)
|
|
#define COND3 (COND1 && COND2)
|
|
#define COND4 (COND3 ? COND2 : COND1) // CHECK: | Branch ([[@LINE]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
#define MACRO1 COND3
|
|
#define MACRO2 MACRO1
|
|
#define MACRO3 MACRO2
|
|
|
|
#include <stdlib.h>
|
|
|
|
// CHECK: |{{ +}}[[#min(C,3)]]|bool func(
|
|
bool func(int a, int b) {
|
|
bool c = COND1 && COND2; // CHECK: | | | Branch ([[@LINE-12]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | Branch ([[@LINE-12]]:15): [True: 0, False: 1]
|
|
bool d = COND3; // CHECK: | | | | | Branch ([[@LINE-14]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | | | Branch ([[@LINE-14]]:15): [True: 0, False: 1]
|
|
bool e = MACRO1; // CHECK: | | | | | | | Branch ([[@LINE-16]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | | | | | Branch ([[@LINE-16]]:15): [True: 0, False: 1]
|
|
bool f = MACRO2; // CHECK: | | | | | | | | | Branch ([[@LINE-18]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | | | | | | | Branch ([[@LINE-18]]:15): [True: 0, False: 1]
|
|
bool g = MACRO3; // CHECK: | | | | | | | | | | | Branch ([[@LINE-20]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | | | | | | | | | Branch ([[@LINE-20]]:15): [True: 0, False: 1]
|
|
return c && d && e && f && g;
|
|
// CHECK: | Branch ([[@LINE-1]]:10): [True: 0, False: [[#min(C,3)]]]
|
|
// CHECK: | Branch ([[@LINE-2]]:15): [True: 0, False: 0]
|
|
// CHECK: | Branch ([[@LINE-3]]:20): [True: 0, False: 0]
|
|
// CHECK: | Branch ([[@LINE-4]]:25): [True: 0, False: 0]
|
|
// CHECK: | Branch ([[@LINE-5]]:30): [True: 0, False: 0]
|
|
}
|
|
|
|
|
|
bool func2(int a, int b) {
|
|
bool h = MACRO3 || COND4; // CHECK: | | | | | | | | | | | Branch ([[@LINE-32]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | | | | | | | | | Branch ([[@LINE-32]]:15): [True: 0, False: 1]
|
|
// CHECK: | | | | | | | Branch ([[@LINE-34]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
// CHECK: | | | | | | | Branch ([[@LINE-34]]:15): [True: 0, False: 1]
|
|
// CHECK: | | | Branch ([[@LINE-33]]:15): [True: 1, False: [[#min(C,2)]]]
|
|
return h;
|
|
}
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
func(atoi(argv[1]), atoi(argv[2]));
|
|
func2(atoi(argv[1]), atoi(argv[2]));
|
|
(void)0;
|
|
return 0;
|
|
}
|