From: Patrick Palka Date: Thu, 23 Apr 2026 22:31:56 +0000 (-0400) Subject: c++/modules: stream PTRMEM_CST_LOCATION and TRAIT_EXPR_LOCATION X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e03d48d7216ff60882e0cd7ae050f9e45e9798e;p=thirdparty%2Fgcc.git c++/modules: stream PTRMEM_CST_LOCATION and TRAIT_EXPR_LOCATION gcc/cp/ChangeLog: * module.cc (trees_out::core_vals) : Stream PTRMEM_CST_LOCATION. : Stream TRAIT_EXPR_LOCATION. (trees_in::core_vals): As in trees_out::core_vals. Reviewed-by: Jason Merrill --- diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 101b4fde74f..091031798dc 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -6872,6 +6872,8 @@ trees_out::core_vals (tree t) case PTRMEM_CST: WT (((lang_tree_node *)t)->ptrmem.member); + if (state) + state->write_location (*this, ((lang_tree_node *)t)->ptrmem.locus); break; case STATIC_ASSERT: @@ -6933,6 +6935,9 @@ trees_out::core_vals (tree t) case TRAIT_EXPR: WT (((lang_tree_node *)t)->trait_expression.type1); WT (((lang_tree_node *)t)->trait_expression.type2); + if (state) + state->write_location + (*this, ((lang_tree_node *)t)->trait_expression.locus); if (streaming_p ()) WU (((lang_tree_node *)t)->trait_expression.kind); break; @@ -7444,6 +7449,7 @@ trees_in::core_vals (tree t) case PTRMEM_CST: RTU (((lang_tree_node *)t)->ptrmem.member); + ((lang_tree_node *)t)->ptrmem.locus = state->read_location (*this); break; case STATIC_ASSERT: @@ -7493,6 +7499,8 @@ trees_in::core_vals (tree t) case TRAIT_EXPR: RT (((lang_tree_node *)t)->trait_expression.type1); RT (((lang_tree_node *)t)->trait_expression.type2); + ((lang_tree_node *)t)->trait_expression.locus + = state->read_location (*this); RUC (cp_trait_kind, ((lang_tree_node *)t)->trait_expression.kind); break;