diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index b5f1af8..6ae9556 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -13839,6 +13839,8 @@ cp_parser_template_id (cp_parser *parser, else if (variable_template_p (templ)) { template_id = lookup_template_variable (templ, arguments); + if (TREE_CODE (template_id) == TEMPLATE_ID_EXPR) + SET_EXPR_LOCATION (template_id, next_token->location); } else { @@ -13849,6 +13851,8 @@ cp_parser_template_id (cp_parser *parser, || BASELINK_P (templ))); template_id = lookup_template_function (templ, arguments); + if (TREE_CODE (template_id) == TEMPLATE_ID_EXPR) + SET_EXPR_LOCATION (template_id, next_token->location); } /* If parsing tentatively, replace the sequence of tokens that makes |