1 // Exercises the reporting of struct differences in --leaf-changes-only mode.
2 // The resulting report should have no excess blank lines.
3 struct ops {
4 long changed_var; // was int
changed_fnops5 virtual long changed_fn() { return 0; } // was int
6 // Note that in order for this to be treated as an addition, as opposed to a
7 // change, we need to make sure it's at a different offset from anything in
8 // the old version of ops; having type, name and size different but the same
9 // offset won't work.
10 long added_var;
added_fnops11 virtual long added_fn() { return 0; }
12 };
13
reg(ops & x)14 void reg(ops& x) {
15 ops instantiate = x;
16 (void) instantiate;
17 }
18