On 05/16/2012 06:54 AM, Paolo Carlini wrote:
isn't the diagnostic machinery able to cope with UNKNOWN_LOCATION? By
default should be interpreted as input_location, no?

That would make sense to me; I don't know if it works that way now, though.

@@ -11968,7 +11968,8 @@ tsubst_qualified_id (tree qualified_id, tree args,
   if (dependent_scope_p (scope))
     {
       if (is_template)
-       expr = build_min_nt (TEMPLATE_ID_EXPR, expr, template_args);
+       expr = build_min_nt_loc (UNKNOWN_LOCATION, TEMPLATE_ID_EXPR,
+                                expr, template_args);

Here we should be able to retain the location from the TEMPLATE_ID_EXPR we took apart earlier.

Jason

Reply via email to