On 12/11/2015 02:43 PM, Patrick Palka wrote:
+         if (processing_template_decl
+             && result != NULL_TREE
+             && result != error_mark_node
+             && DECL_HIDDEN_FRIEND_P (cand->fn))
+           {
+             tree call = result;
+             if (REFERENCE_REF_P (call))
+               call = TREE_OPERAND (call, 0);
+             KOENIG_LOOKUP_P (call) = 1;
+           }

This should have a comment explaining that this prevents build_new_function_call from discarding the function.

+  if (op == PREINCREMENT_EXPR
+      || op == PREDECREMENT_EXPR)
+    gcc_assert (nargs == 1);
+  else if (op == MODOP_EXPR)
+    gcc_assert (nargs == 2);
+  else
+    gcc_assert (nargs == TREE_CODE_LENGTH (op));

This should use cp_tree_operand_length.

Jason

Reply via email to