summaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2017-05-23 10:58:57 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2017-05-23 10:58:57 +0000
commiteb9d4ee4915a6dea0e79da17fdf10eedfcdb17e0 (patch)
treef7cd3c7126e3fea6faa455d363ecf982e14ca211 /libcc1
parent50253e0713c01a6cddfcdbe2e8956e1e03ea2c79 (diff)
downloadgcc-eb9d4ee4915a6dea0e79da17fdf10eedfcdb17e0.tar.gz
gcc/cp
* cp-tree.h (OVL_P): New. * name-lookup.h (push_local_binding): Delete. (do_toplevel_using_decl, do_local_using_decl): Rename to ... (finish_namespace_using_decl, finish_local_using_decl): ... here * name-lookup.c (add_decl_to_level): Swap args. (pop_bindings_and_leave_scope): Look inside TREE_LIST. (diagnose_name_conflict): Check contexts are same for redecl. (update_local_overload): New. (compparms_for_decl_and_using): Rename to ... (matching_fn_p): ... here. (pushdecl_maybe_friend_1): Adjust add_decl_to_level, push_local_bindings call. (push_local_binding): Make static, replace FLAGS arg with IS_USING. (validate_nonmember_using_decl): Use OVL_FIRST. (do_nonmember_using_decl): Use in/out parameters. Use lkp_iterator and simplify. (do_toplevel_using_decl, do_local_using_decl): Rename to ... (finish_namespace_using_decl, finish_local_using_decl): ... here. Adjust. (lookup_type_current_level): Delete. * parser.c (cp_parser_using_declaration): Adjust. * pt.c (tsubst_expr): Adjust. libcc1/ * libcp1plugin.cc (plugin_add_using_decl): Call finish_namespace_using_decl. Use assert not unreachable. gcc/testsuite/ * g++.dg/lookup/using13.C: Adjust expected error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248364 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/ChangeLog5
-rw-r--r--libcc1/libcp1plugin.cc9
2 files changed, 9 insertions, 5 deletions
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index 0a66c21f546..1969873a1fd 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-23 Nathan Sidwell <nathan@acm.org>
+
+ * libcp1plugin.cc (plugin_add_using_decl): Call
+ finish_namespace_using_decl. Use assert not unreachable.
+
2017-05-11 Nathan Sidwell <nathan@acm.org>
* libcp1plugin.cc (safe_pushdecl_maybe_friend): Call pushdecl.
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
index 7e308620b56..7db74c737a0 100644
--- a/libcc1/libcp1plugin.cc
+++ b/libcc1/libcp1plugin.cc
@@ -1030,13 +1030,12 @@ plugin_add_using_decl (cc1_plugin::connection *,
finish_member_declaration (decl);
}
- else if (!at_namespace_scope_p ())
+ else
{
- gcc_unreachable ();
- do_local_using_decl (target, tcontext, identifier);
+ /* We can't be at local scope. */
+ gcc_assert (at_namespace_scope_p ());
+ finish_namespace_using_decl (target, tcontext, identifier);
}
- else
- do_toplevel_using_decl (target, tcontext, identifier);
return 1;
}