From 8de4a6749d16ac2663ee5a071906b8d469ad9049 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 29 Mar 2018 15:38:35 -0400 Subject: [PATCH] * pt.c (build_non_dependent_expr): Propagate expr location. From-SVN: r258963 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/pt.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 454866e6e77..cc950e8d74e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2018-03-29 Jason Merrill + + * pt.c (build_non_dependent_expr): Propagate expr location. + 2018-03-27 Jason Merrill PR c++/85060 - wrong-code with call to base member in template. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 07dad996504..40ddf9ec989 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -25473,7 +25473,8 @@ build_non_dependent_expr (tree expr) gcc_assert (TREE_TYPE (expr) != unknown_type_node); /* Otherwise, build a NON_DEPENDENT_EXPR. */ - return build1 (NON_DEPENDENT_EXPR, TREE_TYPE (expr), expr); + return build1_loc (EXPR_LOCATION (orig_expr), NON_DEPENDENT_EXPR, + TREE_TYPE (expr), expr); } /* ARGS is a vector of expressions as arguments to a function call. -- 2.30.2