From: jason Date: Fri, 10 Jul 2015 21:34:59 +0000 (+0000) Subject: * parser.c (cp_parser_template_id): SET_EXPR_LOCATION. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=180a64e78746de59eec26a19db95ac2e63d1ef19;p=thirdparty%2Fgcc.git * parser.c (cp_parser_template_id): SET_EXPR_LOCATION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225691 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4f61c89b9484..cf9f838a1c19 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2015-07-10 Jason Merrill + + * parser.c (cp_parser_template_id): SET_EXPR_LOCATION. + 2015-07-10 Eric Botcazou * decl2.c (cpp_check): Revert latest change. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index b5f1af8b1352..6ae955698002 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