On 9/26/19 9:45 PM, Marek Polacek wrote:
Jason, you remarked that adding a ck_qual under the ck_ref_bind might be
too much trouble, but it seems it's actually fairly simple.  The comments
hopefully explain my thinking.  Is this what you had in mind?

Yes, I'm glad to hear it was simpler than I worried it would be.

+       /* direct_reference_binding might have inserted a ck_qual under
+          this ck_ref_bind for the benefit of conversion sequence ranking.
+          Ignore the conversion; we'll create our own below.  */
+       if (next_conversion (convs)->kind == ck_qual)
+         {
+           gcc_assert (same_type_p (TREE_TYPE (expr),
+                                    next_conversion (convs)->type));
+           STRIP_NOPS (expr);

Why STRIP_NOPS?

Jason

Reply via email to