Commit 303357a7 by Giovanni Bajo Committed by Bernardo Innocenti

cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.

	* cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
	* error.c (dump_function_decl): Use it to skip the dump of the
	arguments.
	(dump_expr): When dumping a declaration found within an
	expression, always set TFF_NO_FUNCTION_ARGUMENTS
	in the flags.

From-SVN: r72215
parent 605143d8
2003-10-06 Giovanni Bajo <giovannibajo@libero.it> 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
* cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
* error.c (dump_function_decl): Use it to skip the dump of the
arguments.
(dump_expr): When dumping a declaration found within an
expression, always set TFF_NO_FUNCTION_ARGUMENTS
in the flags.
2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
PR c++/11097 PR c++/11097
* pt.c (tsubst_decl): Substitute also the DECL_NAME node of * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
......
...@@ -3432,7 +3432,8 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3432,7 +3432,8 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
TFF_TEMPLATE_HEADER: show the template<...> header in a TFF_TEMPLATE_HEADER: show the template<...> header in a
template-declaration. template-declaration.
TFF_TEMPLATE_NAME: show only template-name. TFF_TEMPLATE_NAME: show only template-name.
TFF_EXPR_IN_PARENS: Parenthesize expressions. */ TFF_EXPR_IN_PARENS: parenthesize expressions.
TFF_NO_FUNCTION_ARGUMENTS: don't show function arguments. */
#define TFF_PLAIN_IDENTIFIER (0) #define TFF_PLAIN_IDENTIFIER (0)
#define TFF_SCOPE (1) #define TFF_SCOPE (1)
...@@ -3445,6 +3446,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3445,6 +3446,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
#define TFF_TEMPLATE_HEADER (1 << 7) #define TFF_TEMPLATE_HEADER (1 << 7)
#define TFF_TEMPLATE_NAME (1 << 8) #define TFF_TEMPLATE_NAME (1 << 8)
#define TFF_EXPR_IN_PARENS (1 << 9) #define TFF_EXPR_IN_PARENS (1 << 9)
#define TFF_NO_FUNCTION_ARGUMENTS (1 << 10)
/* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM /* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
node. */ node. */
......
...@@ -1082,7 +1082,7 @@ dump_function_decl (tree t, int flags) ...@@ -1082,7 +1082,7 @@ dump_function_decl (tree t, int flags)
dump_function_name (t, flags); dump_function_name (t, flags);
if (1) if (!(flags & TFF_NO_FUNCTION_ARGUMENTS))
{ {
dump_parameters (parmtypes, flags); dump_parameters (parmtypes, flags);
...@@ -1302,7 +1302,7 @@ dump_expr (tree t, int flags) ...@@ -1302,7 +1302,7 @@ dump_expr (tree t, int flags)
case NAMESPACE_DECL: case NAMESPACE_DECL:
case OVERLOAD: case OVERLOAD:
case IDENTIFIER_NODE: case IDENTIFIER_NODE:
dump_decl (t, flags & ~TFF_DECL_SPECIFIERS); dump_decl (t, (flags & ~TFF_DECL_SPECIFIERS) | TFF_NO_FUNCTION_ARGUMENTS);
break; break;
case INTEGER_CST: case INTEGER_CST:
......
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