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
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
// RUN: %clang_analyze_cc1 -w -analyzer-checker=core -analyzer-output=text \
|
|
// RUN: -verify %s
|
|
|
|
namespace note_on_skipped_vbases {
|
|
struct A {
|
|
int x;
|
|
A() : x(0) {} // expected-note{{The value 0 is assigned to 'c.x'}}
|
|
A(int x) : x(x) {}
|
|
};
|
|
|
|
struct B : virtual A {
|
|
int y;
|
|
// This note appears only once, when this constructor is called from C.
|
|
// When this constructor is called from D, this note is still correct but
|
|
// it doesn't appear because it's pruned out because it's irrelevant to the
|
|
// bug report.
|
|
B(): // expected-note{{Virtual base initialization skipped because it has already been handled by the most derived class}}
|
|
A(1),
|
|
y(1 / x) // expected-warning{{Division by zero}}
|
|
// expected-note@-1{{Division by zero}}
|
|
{}
|
|
};
|
|
|
|
struct C : B {
|
|
C(): // expected-note{{Calling default constructor for 'A'}}
|
|
// expected-note@-1{{Returning from default constructor for 'A'}}
|
|
B() // expected-note{{Calling default constructor for 'B'}}
|
|
{}
|
|
};
|
|
|
|
void test_note() {
|
|
C c; // expected-note{{Calling default constructor for 'C'}}
|
|
}
|
|
|
|
struct D: B {
|
|
D() : A(1), B() {}
|
|
};
|
|
|
|
void test_prunability() {
|
|
D d;
|
|
1 / 0; // expected-warning{{Division by zero}}
|
|
// expected-note@-1{{Division by zero}}
|
|
}
|
|
} // namespace note_on_skipped_vbases
|