Tested x86_64-pc-linux-gnu, applying to trunk.
-- 8< --
The caller of build_nop seems more interesting than that tiny function
itself.
gcc/cp/ChangeLog:
* cp-tree.h (build_nop): Add CXX_MEM_STAT_INFO.
* typeck.cc (build_nop): Add MEM_STAT_DECL.
---
gcc/cp/cp-tree.h | 2 +-
gcc/cp/typeck.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 6184d99f4af..c08494705e9 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -8438,7 +8438,7 @@ extern tree build_x_shufflevector
(location_t,
extern tree build_simple_component_ref (tree, tree);
extern tree build_ptrmemfunc_access_expr (tree, tree);
extern tree build_address (tree);
-extern tree build_nop (tree, tree);
+extern tree build_nop (tree, tree CXX_MEM_STAT_INFO);
extern tree non_reference (tree);
extern tree lookup_anon_field (tree, tree);
extern bool invalid_nonstatic_memfn_p (location_t, tree,
diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc
index 1f9a74166f4..c3ef9299f59 100644
--- a/gcc/cp/typeck.cc
+++ b/gcc/cp/typeck.cc
@@ -7149,11 +7149,11 @@ build_address (tree t)
/* Return a NOP_EXPR converting EXPR to TYPE. */
tree
-build_nop (tree type, tree expr)
+build_nop (tree type, tree expr MEM_STAT_DECL)
{
if (type == error_mark_node || error_operand_p (expr))
return expr;
- return build1_loc (EXPR_LOCATION (expr), NOP_EXPR, type, expr);
+ return build1_loc (EXPR_LOCATION (expr), NOP_EXPR, type, expr PASS_MEM_STAT);
}
/* Take the address of ARG, whatever that means under C++ semantics.
base-commit: ec99905f7b39914ddb074c13ffbe05f0216784a1
--
2.47.1