Commit d4e15523 by Nathan Sidwell Committed by Nathan Sidwell

[C++ PATCH] some cleanups

https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01227.html
	* cp-tree.h (TEMPLATE_INFO): Fix comments.
	(TI_PENDING_TEMPLATE_FLAG): Check TEMPLATE_INFO.
	(NON_DEFAULT_TEMPLATE_ARG_COUNT): Wrap line.
	(dump, print_other_binding_stacks): Remove declarations.
	* name-lookup.c (print_other_binding_stack): Make static.
	* pt.c (build_template_decl): Make static.

From-SVN: r259704
parent ae043291
2018-04-27 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (TEMPLATE_INFO): Fix comments.
(TI_PENDING_TEMPLATE_FLAG): Check TEMPLATE_INFO.
(NON_DEFAULT_TEMPLATE_ARG_COUNT): Wrap line.
(dump, print_other_binding_stacks): Remove declarations.
* name-lookup.c (print_other_binding_stack): Make static.
* pt.c (build_template_decl): Make static.
2018-04-26 Jason Merrill <jason@redhat.com>
PR c++/85545 - ICE with noexcept PMF conversion.
......
......@@ -3273,11 +3273,11 @@ extern void decl_shadowed_for_var_insert (tree, tree);
DECL_USE_TEMPLATE is nonzero) or the abstract instance of the
template itself.
In either case, DECL_TEMPLATE_INFO is a TREE_LIST, whose
TREE_PURPOSE is the TEMPLATE_DECL of which this entity is a
specialization or abstract instance. The TREE_VALUE is the
In either case, DECL_TEMPLATE_INFO is a TEMPLATE_INFO, whose
TI_TEMPLATE is the TEMPLATE_DECL of which this entity is a
specialization or abstract instance. The TI_ARGS is the
template arguments used to specialize the template.
Consider:
template <typename T> struct S { friend void f(T) {} };
......@@ -3344,11 +3344,14 @@ extern void decl_shadowed_for_var_insert (tree, tree);
#define TI_TEMPLATE(NODE) TREE_TYPE (TEMPLATE_INFO_CHECK (NODE))
#define TI_ARGS(NODE) TREE_CHAIN (TEMPLATE_INFO_CHECK (NODE))
#define TI_PENDING_TEMPLATE_FLAG(NODE) TREE_LANG_FLAG_1 (NODE)
#define TI_PENDING_TEMPLATE_FLAG(NODE) \
TREE_LANG_FLAG_1 (TEMPLATE_INFO_CHECK (NODE))
/* For a given TREE_VEC containing a template argument list,
this property contains the number of arguments that are not
defaulted. */
#define NON_DEFAULT_TEMPLATE_ARGS_COUNT(NODE) TREE_CHAIN (TREE_VEC_CHECK (NODE))
#define NON_DEFAULT_TEMPLATE_ARGS_COUNT(NODE) \
TREE_CHAIN (TREE_VEC_CHECK (NODE))
/* Below are the setter and getter of the NON_DEFAULT_TEMPLATE_ARGS_COUNT
property. */
#define SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT(NODE, INT_VALUE) \
......@@ -6229,9 +6232,6 @@ extern tree strip_fnptr_conv (tree);
extern void maybe_push_cleanup_level (tree);
extern tree make_anon_name (void);
extern tree check_for_out_of_scope_variable (tree);
extern void dump (cp_binding_level &ref);
extern void dump (cp_binding_level *ptr);
extern void print_other_binding_stack (cp_binding_level *);
extern tree maybe_push_decl (tree);
extern tree current_decl_namespace (void);
......
......@@ -3742,7 +3742,7 @@ debug (cp_binding_level *ptr)
}
void
static void
print_other_binding_stack (cp_binding_level *stack)
{
cp_binding_level *level;
......
......@@ -4674,7 +4674,7 @@ maybe_update_decl_type (tree orig_type, tree scope)
template PARMS and constraints, CONSTR. If MEMBER_TEMPLATE_P is true,
the new template is a member template. */
tree
static tree
build_template_decl (tree decl, tree parms, bool member_template_p)
{
tree tmpl = build_lang_decl (TEMPLATE_DECL, DECL_NAME (decl), NULL_TREE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment