On Wed, May 3, 2017 at 9:51 AM, David Malcolm <dmalc...@redhat.com> wrote: > On Thu, 2017-04-27 at 23:03 +0200, Marek Polacek wrote: >> On Thu, Apr 27, 2017 at 05:10:24PM -0400, David Malcolm wrote: >> > + /* First try const_cast. */ >> > + trial = build_const_cast (dst_type, orig_expr, 0 /* complain >> > */); >> > + if (trial != error_mark_node) >> > + return "const_cast"; >> > + >> > + /* If that fails, try static_cast. */ >> > + trial = build_static_cast (dst_type, orig_expr, 0 /* complain >> > */); >> > + if (trial != error_mark_node) >> > + return "static_cast"; >> > + >> > + /* Finally, try reinterpret_cast. */ >> > + trial = build_reinterpret_cast (dst_type, orig_expr, 0 /* >> > complain */); >> > + if (trial != error_mark_node) >> > + return "reinterpret_cast"; >> >> I think you'll want tf_none instead of 0 /* complain */ in these. >> >> Marek > > Thanks. > > Here's an updated version of the patch. > > Changes since v1: > - updated expected fixit-formatting (the new fix-it printer in > r247548 handles this properly now) > - added new test cases as suggested by Florian > - use "tf_none" rather than "0 /* complain */" > > Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. > > OK for trunk?
OK. Jason