+2016-11-01 Jason Merrill <jason@redhat.com>
+
+ * class.c (declared_access): Split out from handle_using_decl.
+
2016-10-31 Jakub Jelinek <jakub@redhat.com>
PR c++/78089
return 0;
}
+/* Return the access node for DECL's access in its enclosing class. */
+
+tree
+declared_access (tree decl)
+{
+ return (TREE_PRIVATE (decl) ? access_private_node
+ : TREE_PROTECTED (decl) ? access_protected_node
+ : access_public_node);
+}
+
/* Process the USING_DECL, which is a member of T. */
static void
{
tree decl = USING_DECL_DECLS (using_decl);
tree name = DECL_NAME (using_decl);
- tree access
- = TREE_PRIVATE (using_decl) ? access_private_node
- : TREE_PROTECTED (using_decl) ? access_protected_node
- : access_public_node;
+ tree access = declared_access (using_decl);
tree flist = NULL_TREE;
tree old_value;
extern void resort_type_method_vec (void *, void *,
gt_pointer_operator, void *);
extern bool add_method (tree, tree, tree);
+extern tree declared_access (tree);
extern tree currently_open_class (tree);
extern tree currently_open_derived_class (tree);
extern tree outermost_open_class (void);