summaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-15 00:41:35 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-15 00:41:35 +0000
commit653e540576c50568687d95e09f5f3322fc15e227 (patch)
treed8691b706a5d24462549fd36e73e1589e7ac65d9 /gcc/cp/cxx-pretty-print.c
parenta91390d29db9af35dd45bd5b5ba4ed7ddfab93cd (diff)
downloadgcc-653e540576c50568687d95e09f5f3322fc15e227.tar.gz
Canonicalize whitespace.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100965 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c420
1 files changed, 210 insertions, 210 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 9f813a586f5..61adb81dd1b 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -162,20 +162,20 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
case IDENTIFIER_NODE:
if (t == NULL)
- pp_cxx_identifier (pp, "<unnamed>");
+ pp_cxx_identifier (pp, "<unnamed>");
else if (IDENTIFIER_TYPENAME_P (t))
- pp_cxx_conversion_function_id (pp, t);
+ pp_cxx_conversion_function_id (pp, t);
else
- {
- if (is_destructor_name (t))
- {
- pp_complement (pp);
- /* FIXME: Why is this necessary? */
- if (TREE_TYPE (t))
- t = constructor_name (TREE_TYPE (t));
- }
- pp_cxx_tree_identifier (pp, t);
- }
+ {
+ if (is_destructor_name (t))
+ {
+ pp_complement (pp);
+ /* FIXME: Why is this necessary? */
+ if (TREE_TYPE (t))
+ t = constructor_name (TREE_TYPE (t));
+ }
+ pp_cxx_tree_identifier (pp, t);
+ }
break;
case TEMPLATE_ID_EXPR:
@@ -195,9 +195,9 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
case TEMPLATE_TYPE_PARM:
case TEMPLATE_TEMPLATE_PARM:
if (TYPE_IDENTIFIER (t))
- pp_cxx_unqualified_id (pp, TYPE_IDENTIFIER (t));
+ pp_cxx_unqualified_id (pp, TYPE_IDENTIFIER (t));
else
- pp_cxx_canonical_template_parameter (pp, t);
+ pp_cxx_canonical_template_parameter (pp, t);
break;
case TEMPLATE_PARM_INDEX:
@@ -255,20 +255,20 @@ pp_cxx_qualified_id (cxx_pretty_printer *pp, tree t)
break;
/* In Standard C++, functions cannot possibly be used as
- nested-name-specifiers. However, there are situations where
- is "makes sense" to output the surrounding function name for the
- purpose of emphasizing on the scope kind. Just printing the
- function name might not be sufficient as it may be overloaded; so,
- we decorate the function with its signature too.
- FIXME: This is probably the wrong pretty-printing for conversion
- functions and some function templates. */
+ nested-name-specifiers. However, there are situations where
+ is "makes sense" to output the surrounding function name for the
+ purpose of emphasizing on the scope kind. Just printing the
+ function name might not be sufficient as it may be overloaded; so,
+ we decorate the function with its signature too.
+ FIXME: This is probably the wrong pretty-printing for conversion
+ functions and some function templates. */
case OVERLOAD:
t = OVL_CURRENT (t);
case FUNCTION_DECL:
if (DECL_FUNCTION_MEMBER_P (t))
- pp_cxx_nested_name_specifier (pp, DECL_CONTEXT (t));
+ pp_cxx_nested_name_specifier (pp, DECL_CONTEXT (t));
pp_cxx_unqualified_id
- (pp, DECL_CONSTRUCTOR_P (t) ? DECL_CONTEXT (t) : t);
+ (pp, DECL_CONSTRUCTOR_P (t) ? DECL_CONTEXT (t) : t);
pp_cxx_parameter_declaration_clause (pp, TREE_TYPE (t));
break;
@@ -280,13 +280,13 @@ pp_cxx_qualified_id (cxx_pretty_printer *pp, tree t)
default:
{
- tree scope = TYPE_P (t) ? TYPE_CONTEXT (t) : DECL_CONTEXT (t);
- if (scope != pp->enclosing_scope)
- {
- pp_cxx_nested_name_specifier (pp, scope);
- pp_cxx_template_keyword_if_needed (pp, scope, t);
- }
- pp_cxx_unqualified_id (pp, t);
+ tree scope = TYPE_P (t) ? TYPE_CONTEXT (t) : DECL_CONTEXT (t);
+ if (scope != pp->enclosing_scope)
+ {
+ pp_cxx_nested_name_specifier (pp, scope);
+ pp_cxx_template_keyword_if_needed (pp, scope, t);
+ }
+ pp_cxx_unqualified_id (pp, t);
}
break;
}
@@ -365,7 +365,7 @@ pp_cxx_primary_expression (cxx_pretty_printer *pp, tree t)
simple-type-specifier ( expression-list(opt) )
typename ::(opt) nested-name-specifier identifier ( expression-list(opt) )
typename ::(opt) nested-name-specifier template(opt)
- template-id ( expression-list(opt) )
+ template-id ( expression-list(opt) )
postfix-expression . template(opt) ::(opt) id-expression
postfix-expression -> template(opt) ::(opt) id-expression
postfix-expression . pseudo-destructor-name
@@ -389,54 +389,54 @@ pp_cxx_postfix_expression (cxx_pretty_printer *pp, tree t)
case AGGR_INIT_EXPR:
case CALL_EXPR:
{
- tree fun = TREE_OPERAND (t, 0);
- tree args = TREE_OPERAND (t, 1);
- tree saved_scope = pp->enclosing_scope;
-
- if (TREE_CODE (fun) == ADDR_EXPR)
- fun = TREE_OPERAND (fun, 0);
-
- /* In templates, where there is no way to tell whether a given
- call uses an actual member function. So the parser builds
- FUN as a COMPONENT_REF or a plain IDENTIFIER_NODE until
- instantiation time. */
- if (TREE_CODE (fun) != FUNCTION_DECL)
- ;
- else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fun))
- {
- tree object = code == AGGR_INIT_EXPR && AGGR_INIT_VIA_CTOR_P (t)
- ? TREE_OPERAND (t, 2)
- : TREE_VALUE (args);
-
- while (TREE_CODE (object) == NOP_EXPR)
- object = TREE_OPERAND (object, 0);
-
- if (TREE_CODE (object) == ADDR_EXPR)
- object = TREE_OPERAND (object, 0);
-
- if (TREE_CODE (TREE_TYPE (object)) != POINTER_TYPE)
- {
- pp_cxx_postfix_expression (pp, object);
- pp_cxx_dot (pp);
- }
- else
- {
- pp_cxx_postfix_expression (pp, object);
- pp_cxx_arrow (pp);
- }
- args = TREE_CHAIN (args);
- pp->enclosing_scope = strip_pointer_operator (TREE_TYPE (object));
- }
-
- pp_cxx_postfix_expression (pp, fun);
- pp->enclosing_scope = saved_scope;
- pp_cxx_call_argument_list (pp, args);
+ tree fun = TREE_OPERAND (t, 0);
+ tree args = TREE_OPERAND (t, 1);
+ tree saved_scope = pp->enclosing_scope;
+
+ if (TREE_CODE (fun) == ADDR_EXPR)
+ fun = TREE_OPERAND (fun, 0);
+
+ /* In templates, where there is no way to tell whether a given
+ call uses an actual member function. So the parser builds
+ FUN as a COMPONENT_REF or a plain IDENTIFIER_NODE until
+ instantiation time. */
+ if (TREE_CODE (fun) != FUNCTION_DECL)
+ ;
+ else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fun))
+ {
+ tree object = code == AGGR_INIT_EXPR && AGGR_INIT_VIA_CTOR_P (t)
+ ? TREE_OPERAND (t, 2)
+ : TREE_VALUE (args);
+
+ while (TREE_CODE (object) == NOP_EXPR)
+ object = TREE_OPERAND (object, 0);
+
+ if (TREE_CODE (object) == ADDR_EXPR)
+ object = TREE_OPERAND (object, 0);
+
+ if (TREE_CODE (TREE_TYPE (object)) != POINTER_TYPE)
+ {
+ pp_cxx_postfix_expression (pp, object);
+ pp_cxx_dot (pp);
+ }
+ else
+ {
+ pp_cxx_postfix_expression (pp, object);
+ pp_cxx_arrow (pp);
+ }
+ args = TREE_CHAIN (args);
+ pp->enclosing_scope = strip_pointer_operator (TREE_TYPE (object));
+ }
+
+ pp_cxx_postfix_expression (pp, fun);
+ pp->enclosing_scope = saved_scope;
+ pp_cxx_call_argument_list (pp, args);
}
if (code == AGGR_INIT_EXPR && AGGR_INIT_VIA_CTOR_P (t))
- {
- pp_cxx_separate_with (pp, ',');
- pp_cxx_postfix_expression (pp, TREE_OPERAND (t, 2));
- }
+ {
+ pp_cxx_separate_with (pp, ',');
+ pp_cxx_postfix_expression (pp, TREE_OPERAND (t, 2));
+ }
break;
case BASELINK:
@@ -456,13 +456,13 @@ pp_cxx_postfix_expression (cxx_pretty_printer *pp, tree t)
case REINTERPRET_CAST_EXPR:
case CONST_CAST_EXPR:
if (code == DYNAMIC_CAST_EXPR)
- pp_cxx_identifier (pp, "dynamic_cast");
+ pp_cxx_identifier (pp, "dynamic_cast");
else if (code == STATIC_CAST_EXPR)
- pp_cxx_identifier (pp, "static_cast");
+ pp_cxx_identifier (pp, "static_cast");
else if (code == REINTERPRET_CAST_EXPR)
- pp_cxx_identifier (pp, "reinterpret_cast");
+ pp_cxx_identifier (pp, "reinterpret_cast");
else
- pp_cxx_identifier (pp, "const_cast");
+ pp_cxx_identifier (pp, "const_cast");
pp_cxx_begin_template_argument_list (pp);
pp_cxx_type_id (pp, TREE_TYPE (t));
pp_cxx_end_template_argument_list (pp);
@@ -482,9 +482,9 @@ pp_cxx_postfix_expression (cxx_pretty_printer *pp, tree t)
pp_cxx_identifier (pp, "typeid");
pp_left_paren (pp);
if (TYPE_P (t))
- pp_cxx_type_id (pp, t);
+ pp_cxx_type_id (pp, t);
else
- pp_cxx_expression (pp, t);
+ pp_cxx_expression (pp, t);
pp_right_paren (pp);
break;
@@ -538,27 +538,27 @@ pp_cxx_new_expression (cxx_pretty_printer *pp, tree t)
case NEW_EXPR:
case VEC_NEW_EXPR:
if (NEW_EXPR_USE_GLOBAL (t))
- pp_cxx_colon_colon (pp);
+ pp_cxx_colon_colon (pp);
pp_cxx_identifier (pp, "new");
if (TREE_OPERAND (t, 0))
- {
- pp_cxx_call_argument_list (pp, TREE_OPERAND (t, 0));
- pp_space (pp);
- }
+ {
+ pp_cxx_call_argument_list (pp, TREE_OPERAND (t, 0));
+ pp_space (pp);
+ }
/* FIXME: array-types are built with one more element. */
pp_cxx_type_id (pp, TREE_OPERAND (t, 1));
if (TREE_OPERAND (t, 2))
- {
- pp_left_paren (pp);
- t = TREE_OPERAND (t, 2);
- if (TREE_CODE (t) == TREE_LIST)
- pp_c_expression_list (pp_c_base (pp), t);
- else if (t == void_zero_node)
- ; /* OK, empty initializer list. */
- else
- pp_cxx_expression (pp, t);
- pp_right_paren (pp);
- }
+ {
+ pp_left_paren (pp);
+ t = TREE_OPERAND (t, 2);
+ if (TREE_CODE (t) == TREE_LIST)
+ pp_c_expression_list (pp_c_base (pp), t);
+ else if (t == void_zero_node)
+ ; /* OK, empty initializer list. */
+ else
+ pp_cxx_expression (pp, t);
+ pp_right_paren (pp);
+ }
break;
default:
@@ -579,13 +579,13 @@ pp_cxx_delete_expression (cxx_pretty_printer *pp, tree t)
case DELETE_EXPR:
case VEC_DELETE_EXPR:
if (DELETE_EXPR_USE_GLOBAL (t))
- pp_cxx_colon_colon (pp);
+ pp_cxx_colon_colon (pp);
pp_cxx_identifier (pp, "delete");
if (code == VEC_DELETE_EXPR)
- {
- pp_left_bracket (pp);
- pp_right_bracket (pp);
- }
+ {
+ pp_left_bracket (pp);
+ pp_right_bracket (pp);
+ }
pp_c_cast_expression (pp_c_base (pp), TREE_OPERAND (t, 0));
break;
@@ -685,10 +685,10 @@ pp_cxx_pm_expression (cxx_pretty_printer *pp, tree t)
/* Handle unfortunate OFFESET_REF overloading here. */
case OFFSET_REF:
if (TYPE_P (TREE_OPERAND (t, 0)))
- {
- pp_cxx_qualified_id (pp, t);
- break;
- }
+ {
+ pp_cxx_qualified_id (pp, t);
+ break;
+ }
/* Else fall through. */
case MEMBER_REF:
case DOTSTAR_EXPR:
@@ -825,7 +825,7 @@ pp_cxx_assignment_expression (cxx_pretty_printer *pp, tree e)
case THROW_EXPR:
pp_cxx_identifier (pp, "throw");
if (TREE_OPERAND (e, 0))
- pp_cxx_assignment_expression (pp, TREE_OPERAND (e, 0));
+ pp_cxx_assignment_expression (pp, TREE_OPERAND (e, 0));
break;
case MODOP_EXPR:
@@ -963,11 +963,11 @@ pp_cxx_function_specifier (cxx_pretty_printer *pp, tree t)
{
case FUNCTION_DECL:
if (DECL_VIRTUAL_P (t))
- pp_cxx_identifier (pp, "virtual");
+ pp_cxx_identifier (pp, "virtual");
else if (DECL_CONSTRUCTOR_P (t) && DECL_NONCONVERTING_P (t))
- pp_cxx_identifier (pp, "explicit");
+ pp_cxx_identifier (pp, "explicit");
else
- pp_c_function_specifier (pp_c_base (pp), t);
+ pp_c_function_specifier (pp_c_base (pp), t);
default:
break;
@@ -1004,23 +1004,23 @@ pp_cxx_decl_specifier_seq (cxx_pretty_printer *pp, tree t)
case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (t))
- {
- tree pfm = TYPE_PTRMEMFUNC_FN_TYPE (t);
- pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (pfm)));
- pp_cxx_whitespace (pp);
- pp_cxx_ptr_operator (pp, t);
- }
+ {
+ tree pfm = TYPE_PTRMEMFUNC_FN_TYPE (t);
+ pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (pfm)));
+ pp_cxx_whitespace (pp);
+ pp_cxx_ptr_operator (pp, t);
+ }
break;
case FUNCTION_DECL:
/* Constructors don't have return types. And conversion functions
- do not have a type-specifier in their return types. */
+ do not have a type-specifier in their return types. */
if (DECL_CONSTRUCTOR_P (t) || DECL_CONV_FN_P (t))
- pp_cxx_function_specifier (pp, t);
+ pp_cxx_function_specifier (pp, t);
else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t))
- pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t)));
+ pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t)));
else
- default:
+ default:
pp_c_declaration_specifiers (pp_c_base (pp), t);
break;
}
@@ -1102,7 +1102,7 @@ pp_cxx_type_specifier_seq (cxx_pretty_printer *pp, tree t)
default:
if (!(TREE_CODE (t) == FUNCTION_DECL && DECL_CONSTRUCTOR_P (t)))
- pp_c_specifier_qualifier_list (pp_c_base (pp), t);
+ pp_c_specifier_qualifier_list (pp_c_base (pp), t);
}
}
@@ -1121,35 +1121,35 @@ pp_cxx_ptr_operator (cxx_pretty_printer *pp, tree t)
case REFERENCE_TYPE:
case POINTER_TYPE:
if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE
- || TYPE_PTR_TO_MEMBER_P (TREE_TYPE (t)))
- pp_cxx_ptr_operator (pp, TREE_TYPE (t));
+ || TYPE_PTR_TO_MEMBER_P (TREE_TYPE (t)))
+ pp_cxx_ptr_operator (pp, TREE_TYPE (t));
if (TREE_CODE (t) == POINTER_TYPE)
- {
- pp_star (pp);
- pp_cxx_cv_qualifier_seq (pp, t);
- }
+ {
+ pp_star (pp);
+ pp_cxx_cv_qualifier_seq (pp, t);
+ }
else
- pp_ampersand (pp);
+ pp_ampersand (pp);
break;
case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (t))
- {
- pp_cxx_left_paren (pp);
- pp_cxx_nested_name_specifier (pp, TYPE_PTRMEMFUNC_OBJECT_TYPE (t));
- pp_star (pp);
- break;
- }
+ {
+ pp_cxx_left_paren (pp);
+ pp_cxx_nested_name_specifier (pp, TYPE_PTRMEMFUNC_OBJECT_TYPE (t));
+ pp_star (pp);
+ break;
+ }
case OFFSET_TYPE:
if (TYPE_PTR_TO_MEMBER_P (t))
- {
- if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE)
- pp_cxx_left_paren (pp);
- pp_cxx_nested_name_specifier (pp, TYPE_PTRMEM_CLASS_TYPE (t));
- pp_star (pp);
- pp_cxx_cv_qualifier_seq (pp, t);
- break;
- }
+ {
+ if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE)
+ pp_cxx_left_paren (pp);
+ pp_cxx_nested_name_specifier (pp, TYPE_PTRMEM_CLASS_TYPE (t));
+ pp_star (pp);
+ pp_cxx_cv_qualifier_seq (pp, t);
+ break;
+ }
/* else fall through. */
default:
@@ -1207,16 +1207,16 @@ pp_cxx_parameter_declaration_clause (cxx_pretty_printer *pp, tree t)
for (; args; args = TREE_CHAIN (args), types = TREE_CHAIN (types))
{
if (!first)
- pp_cxx_separate_with (pp, ',');
+ pp_cxx_separate_with (pp, ',');
first = false;
pp_cxx_parameter_declaration (pp, abstract ? TREE_VALUE (types) : args);
if (!abstract && pp_c_base (pp)->flags & pp_cxx_flag_default_argument)
- {
- pp_cxx_whitespace (pp);
- pp_equal (pp);
- pp_cxx_whitespace (pp);
- pp_cxx_assignment_expression (pp, TREE_PURPOSE (types));
- }
+ {
+ pp_cxx_whitespace (pp);
+ pp_equal (pp);
+ pp_cxx_whitespace (pp);
+ pp_cxx_assignment_expression (pp, TREE_PURPOSE (types));
+ }
}
pp_cxx_right_paren (pp);
}
@@ -1241,7 +1241,7 @@ pp_cxx_exception_specification (cxx_pretty_printer *pp, tree t)
{
pp_cxx_type_id (pp, TREE_VALUE (ex_spec));
if (TREE_CHAIN (ex_spec))
- pp_cxx_separate_with (pp, ',');
+ pp_cxx_separate_with (pp, ',');
}
pp_cxx_right_paren (pp);
}
@@ -1249,7 +1249,7 @@ pp_cxx_exception_specification (cxx_pretty_printer *pp, tree t)
/* direct-declarator:
declarator-id
direct-declarator ( parameter-declaration-clause ) cv-qualifier-seq(opt)
- exception-specification(opt)
+ exception-specification(opt)
direct-declaration [ constant-expression(opt) ]
( declarator ) */
@@ -1263,10 +1263,10 @@ pp_cxx_direct_declarator (cxx_pretty_printer *pp, tree t)
case CONST_DECL:
case FIELD_DECL:
if (DECL_NAME (t))
- {
- pp_cxx_space_for_pointer_operator (pp, TREE_TYPE (t));
- pp_cxx_id_expression (pp, DECL_NAME (t));
- }
+ {
+ pp_cxx_space_for_pointer_operator (pp, TREE_TYPE (t));
+ pp_cxx_id_expression (pp, DECL_NAME (t));
+ }
pp_cxx_abstract_declarator (pp, TREE_TYPE (t));
break;
@@ -1276,10 +1276,10 @@ pp_cxx_direct_declarator (cxx_pretty_printer *pp, tree t)
pp_cxx_parameter_declaration_clause (pp, t);
if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t))
- {
- pp_base (pp)->padding = pp_before;
- pp_cxx_cv_qualifier_seq (pp, pp_cxx_implicit_parameter_type (t));
- }
+ {
+ pp_base (pp)->padding = pp_before;
+ pp_cxx_cv_qualifier_seq (pp, pp_cxx_implicit_parameter_type (t));
+ }
pp_cxx_exception_specification (pp, TREE_TYPE (t));
break;
@@ -1333,7 +1333,7 @@ pp_cxx_ctor_initializer (cxx_pretty_printer *pp, tree t)
pp_cxx_primary_expression (pp, TREE_PURPOSE (t));
pp_cxx_call_argument_list (pp, TREE_VALUE (t));
if (TREE_CHAIN (t))
- pp_cxx_separate_with (pp, ',');
+ pp_cxx_separate_with (pp, ',');
}
}
@@ -1372,8 +1372,8 @@ pp_cxx_abstract_declarator (cxx_pretty_printer *pp, tree t)
else if (POINTER_TYPE_P (t))
{
if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE
- || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
- pp_cxx_right_paren (pp);
+ || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
+ pp_cxx_right_paren (pp);
t = TREE_TYPE (t);
}
pp_cxx_direct_abstract_declarator (pp, t);
@@ -1381,7 +1381,7 @@ pp_cxx_abstract_declarator (cxx_pretty_printer *pp, tree t)
/* direct-abstract-declarator:
direct-abstract-declarator(opt) ( parameter-declaration-clause )
- cv-qualifier-seq(opt) exception-specification(opt)
+ cv-qualifier-seq(opt) exception-specification(opt)
direct-abstract-declarator(opt) [ constant-expression(opt) ]
( abstract-declarator ) */
@@ -1396,7 +1396,7 @@ pp_cxx_direct_abstract_declarator (cxx_pretty_printer *pp, tree t)
case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (t))
- pp_cxx_direct_abstract_declarator (pp, TYPE_PTRMEMFUNC_FN_TYPE (t));
+ pp_cxx_direct_abstract_declarator (pp, TYPE_PTRMEMFUNC_FN_TYPE (t));
break;
case METHOD_TYPE:
@@ -1404,11 +1404,11 @@ pp_cxx_direct_abstract_declarator (cxx_pretty_printer *pp, tree t)
pp_cxx_parameter_declaration_clause (pp, t);
pp_cxx_direct_abstract_declarator (pp, TREE_TYPE (t));
if (TREE_CODE (t) == METHOD_TYPE)
- {
- pp_base (pp)->padding = pp_before;
- pp_cxx_cv_qualifier_seq
- (pp, TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t))));
- }
+ {
+ pp_base (pp)->padding = pp_before;
+ pp_cxx_cv_qualifier_seq
+ (pp, TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t))));
+ }
pp_cxx_exception_specification (pp, t);
break;
@@ -1479,12 +1479,12 @@ pp_cxx_template_argument_list (cxx_pretty_printer *pp, tree t)
{
tree arg = TREE_VEC_ELT (t, i);
if (i != 0)
- pp_cxx_separate_with (pp, ',');
+ pp_cxx_separate_with (pp, ',');
if (TYPE_P (arg) || (TREE_CODE (arg) == TEMPLATE_DECL
&& TYPE_P (DECL_TEMPLATE_RESULT (arg))))
- pp_cxx_type_id (pp, arg);
+ pp_cxx_type_id (pp, arg);
else
- pp_cxx_expression (pp, arg);
+ pp_cxx_expression (pp, arg);
}
}
@@ -1527,7 +1527,7 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
break;
/* try-block:
- try compound-statement handler-seq */
+ try compound-statement handler-seq */
case TRY_BLOCK:
pp_maybe_newline_and_indent (pp, 0);
pp_cxx_identifier (pp, "try");
@@ -1535,22 +1535,22 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
pp_cxx_statement (pp, TRY_STMTS (t));
pp_newline_and_indent (pp, -3);
if (CLEANUP_P (t))
- ;
+ ;
else
- pp_cxx_statement (pp, TRY_HANDLERS (t));
+ pp_cxx_statement (pp, TRY_HANDLERS (t));
break;
/*
- handler-seq:
- handler handler-seq(opt)
+ handler-seq:
+ handler handler-seq(opt)
- handler:
- catch ( exception-declaration ) compound-statement
+ handler:
+ catch ( exception-declaration ) compound-statement
- exception-declaration:
- type-specifier-seq declarator
- type-specifier-seq abstract-declarator
- ... */
+ exception-declaration:
+ type-specifier-seq declarator
+ type-specifier-seq abstract-declarator
+ ... */
case HANDLER:
pp_cxx_identifier (pp, "catch");
pp_cxx_left_paren (pp);
@@ -1564,8 +1564,8 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
break;
/* selection-statement:
- if ( expression ) statement
- if ( expression ) statement else statement */
+ if ( expression ) statement
+ if ( expression ) statement else statement */
case IF_STMT:
pp_cxx_identifier (pp, "if");
pp_cxx_whitespace (pp);
@@ -1602,10 +1602,10 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
break;
/* iteration-statement:
- while ( expression ) statement
- do statement while ( expression ) ;
- for ( expression(opt) ; expression(opt) ; expression(opt) ) statement
- for ( declaration expression(opt) ; expression(opt) ) statement */
+ while ( expression ) statement
+ do statement while ( expression ) ;
+ for ( expression(opt) ; expression(opt) ; expression(opt) ) statement
+ for ( declaration expression(opt) ; expression(opt) ) statement */
case WHILE_STMT:
pp_cxx_identifier (pp, "while");
pp_space (pp);
@@ -1637,9 +1637,9 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
pp_space (pp);
pp_cxx_left_paren (pp);
if (FOR_INIT_STMT (t))
- pp_cxx_statement (pp, FOR_INIT_STMT (t));
+ pp_cxx_statement (pp, FOR_INIT_STMT (t));
else
- pp_cxx_semicolon (pp);
+ pp_cxx_semicolon (pp);
pp_needs_newline (pp) = false;
pp_cxx_whitespace (pp);
if (FOR_COND (t))
@@ -1657,9 +1657,9 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
break;
/* jump-statement:
- goto identifier;
- continue ;
- return expression(opt) ; */
+ goto identifier;
+ continue ;
+ return expression(opt) ; */
case BREAK_STMT:
case CONTINUE_STMT:
pp_identifier (pp, TREE_CODE (t) == BREAK_STMT ? "break" : "continue");
@@ -1668,7 +1668,7 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
break;
/* expression-statement:
- expression(opt) ; */
+ expression(opt) ; */
case EXPR_STMT:
pp_cxx_expression (pp, EXPR_STMT_EXPR (t));
pp_cxx_semicolon (pp);
@@ -1756,7 +1756,7 @@ pp_cxx_template_parameter_list (cxx_pretty_printer *pp, tree t)
for (i = 0; i < n; ++i)
{
if (i)
- pp_cxx_separate_with (pp, ',');
+ pp_cxx_separate_with (pp, ',');
pp_cxx_template_parameter (pp, TREE_VEC_ELT (t, i));
}
}
@@ -1783,7 +1783,7 @@ pp_cxx_template_parameter (cxx_pretty_printer *pp, tree t)
case TYPE_DECL:
pp_cxx_identifier (pp, "class");
if (DECL_NAME (parameter))
- pp_cxx_tree_identifier (pp, DECL_NAME (parameter));
+ pp_cxx_tree_identifier (pp, DECL_NAME (parameter));
/* FIXME: Chech if we should print also default argument. */
break;
@@ -1885,19 +1885,19 @@ pp_cxx_declaration (cxx_pretty_printer *pp, tree t)
switch (DECL_USE_TEMPLATE (t))
{
case 1:
- pp_cxx_template_declaration (pp, t);
- break;
+ pp_cxx_template_declaration (pp, t);
+ break;
case 2:
- pp_cxx_explicit_specialization (pp, t);
- break;
+ pp_cxx_explicit_specialization (pp, t);
+ break;
case 3:
- pp_cxx_explicit_instantiation (pp, t);
- break;
+ pp_cxx_explicit_instantiation (pp, t);
+ break;
default:
- break;
+ break;
}
else switch (TREE_CODE (t))
{
@@ -1908,16 +1908,16 @@ pp_cxx_declaration (cxx_pretty_printer *pp, tree t)
case FUNCTION_DECL:
if (DECL_SAVED_TREE (t))
- pp_cxx_function_definition (pp, t);
+ pp_cxx_function_definition (pp, t);
else
- pp_cxx_simple_declaration (pp, t);
+ pp_cxx_simple_declaration (pp, t);
break;
case NAMESPACE_DECL:
if (DECL_NAMESPACE_ALIAS (t))
- pp_cxx_namespace_alias_definition (pp, t);
+ pp_cxx_namespace_alias_definition (pp, t);
else
- pp_cxx_original_namespace_definition (pp, t);
+ pp_cxx_original_namespace_definition (pp, t);
break;
default: