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
63 lines
2.9 KiB
C++
63 lines
2.9 KiB
C++
int fizzbuzz(int x, bool y) {
|
|
return x + y;
|
|
}
|
|
|
|
// C++ but not uses parentheses in the '-analyze-function' option.
|
|
//
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
|
// RUN: -analyze-function='missing_fn' -x c++ \
|
|
// RUN: -triple x86_64-pc-linux-gnu 2>&1 %s \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-CXX
|
|
//
|
|
// CHECK-CXX: Every top-level function was skipped.
|
|
// CHECK-CXX-NEXT: Pass the -analyzer-display-progress for tracking which functions are analyzed.
|
|
// CHECK-CXX-NEXT: For analyzing C++ code you need to pass the function parameter list: -analyze-function="foobar(int, _Bool)"
|
|
|
|
// C but uses parentheses in the '-analyze-function' option.
|
|
//
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
|
// RUN: -analyze-function='missing_fn()' -x c -Dbool=_Bool \
|
|
// RUN: -triple x86_64-pc-linux-gnu 2>&1 %s \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-C
|
|
//
|
|
// CHECK-C: Every top-level function was skipped.
|
|
// CHECK-C-NEXT: Pass the -analyzer-display-progress for tracking which functions are analyzed.
|
|
// CHECK-C-NEXT: For analyzing C code you shouldn't pass the function parameter list, only the name of the function: -analyze-function=foobar
|
|
|
|
// The user passed the '-analyzer-display-progress' option, we don't need to advocate it.
|
|
//
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
|
// RUN: -analyze-function=missing_fn \
|
|
// RUN: -analyzer-display-progress -x c -Dbool=_Bool \
|
|
// RUN: -triple x86_64-pc-linux-gnu 2>&1 %s \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-DONT-ADVOCATE-DISPLAY-PROGRESS
|
|
//
|
|
// CHECK-DONT-ADVOCATE-DISPLAY-PROGRESS: Every top-level function was skipped.
|
|
// CHECK-DONT-ADVOCATE-DISPLAY-PROGRESS-NOT: Pass the -analyzer-display-progress
|
|
|
|
// The user passed the '-analyze-function' option but that doesn't mach to any declaration.
|
|
//
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
|
// RUN: -analyze-function='missing_fn()' -x c++ \
|
|
// RUN: -triple x86_64-pc-linux-gnu 2>&1 %s \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ADVOCATE-DISPLAY-PROGRESS
|
|
//
|
|
// CHECK-ADVOCATE-DISPLAY-PROGRESS: Every top-level function was skipped.
|
|
// CHECK-ADVOCATE-DISPLAY-PROGRESS-NEXT: Pass the -analyzer-display-progress for tracking which functions are analyzed.
|
|
// CHECK-ADVOCATE-DISPLAY-PROGRESS-NOT: For analyzing
|
|
|
|
// The user only enables syntax-only analysis, like `debug.DumpDominators`.
|
|
// `-analyze-function` should only match the given function.
|
|
//
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.DumpDominators -analyzer-config ipa=none \
|
|
// RUN: -analyze-function='fizzbuzz(int, _Bool)' -x c++ \
|
|
// RUN: -triple x86_64-pc-linux-gnu 2>&1 %s \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SYNTAX-ONLY --allow-empty
|
|
//
|
|
// With syntax-only analysis, the function is found and analyzed, so no error message.
|
|
// CHECK-SYNTAX-ONLY: Immediate dominance tree (Node#,IDom#):
|
|
// CHECK-SYNTAX-ONLY-NEXT: (0,1)
|
|
// CHECK-SYNTAX-ONLY-NEXT: (1,2)
|
|
// CHECK-SYNTAX-ONLY-NEXT: (2,2)
|
|
// CHECK-SYNTAX-ONLY-NOT: Every top-level function was skipped.
|