1 // RUN: %clang_analyze_cc1 -w -analyzer-checker=core -analyzer-output=text \
4 namespace note_on_skipped_vbases
{
7 A() : x(0) {} // expected-note{{The value 0 is assigned to 'c.x'}}
11 struct B
: virtual A
{
13 // This note appears only once, when this constructor is called from C.
14 // When this constructor is called from D, this note is still correct but
15 // it doesn't appear because it's pruned out because it's irrelevant to the
17 B(): // expected-note{{Virtual base initialization skipped because it has already been handled by the most derived class}}
19 y(1 / x
) // expected-warning{{Division by zero}}
20 // expected-note@-1{{Division by zero}}
25 C(): // expected-note{{Calling default constructor for 'A'}}
26 // expected-note@-1{{Returning from default constructor for 'A'}}
27 B() // expected-note{{Calling default constructor for 'B'}}
32 C c
; // expected-note{{Calling default constructor for 'C'}}
39 void test_prunability() {
41 1 / 0; // expected-warning{{Division by zero}}
42 // expected-note@-1{{Division by zero}}
44 } // namespace note_on_skipped_vbases