diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-15 00:41:35 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-15 00:41:35 +0000 |
commit | 653e540576c50568687d95e09f5f3322fc15e227 (patch) | |
tree | d8691b706a5d24462549fd36e73e1589e7ac65d9 /gcc/cp/error.c | |
parent | a91390d29db9af35dd45bd5b5ba4ed7ddfab93cd (diff) | |
download | gcc-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/error.c')
-rw-r--r-- | gcc/cp/error.c | 394 |
1 files changed, 197 insertions, 197 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 5ed081833af..c247c97c61e 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -81,7 +81,7 @@ static const char *function_category (tree); static void maybe_print_instantiation_context (diagnostic_context *); static void print_instantiation_full_context (diagnostic_context *); static void print_instantiation_partial_context (diagnostic_context *, - tree, location_t); + tree, location_t); static void cp_diagnostic_starter (diagnostic_context *, diagnostic_info *); static void cp_diagnostic_finalizer (diagnostic_context *, diagnostic_info *); static void cp_print_error_function (diagnostic_context *, diagnostic_info *); @@ -114,10 +114,10 @@ dump_scope (tree scope, int flags) if (TREE_CODE (scope) == NAMESPACE_DECL) { if (scope != global_namespace) - { - dump_decl (scope, f); - pp_cxx_colon_colon (cxx_pp); - } + { + dump_decl (scope, f); + pp_cxx_colon_colon (cxx_pp); + } } else if (AGGREGATE_TYPE_P (scope)) { @@ -155,7 +155,7 @@ dump_template_argument_list (tree args, int flags) for (i = 0; i< n; ++i) { if (need_comma) - pp_separate_with_comma (cxx_pp); + pp_separate_with_comma (cxx_pp); dump_template_argument (TREE_VEC_ELT (args, i), flags); need_comma = 1; } @@ -172,15 +172,15 @@ dump_template_parameter (tree parm, int flags) if (TREE_CODE (p) == TYPE_DECL) { if (flags & TFF_DECL_SPECIFIERS) - { - pp_cxx_identifier (cxx_pp, "class"); - if (DECL_NAME (p)) - pp_cxx_tree_identifier (cxx_pp, DECL_NAME (p)); - } + { + pp_cxx_identifier (cxx_pp, "class"); + if (DECL_NAME (p)) + pp_cxx_tree_identifier (cxx_pp, DECL_NAME (p)); + } else if (DECL_NAME (p)) - pp_cxx_tree_identifier (cxx_pp, DECL_NAME (p)); + pp_cxx_tree_identifier (cxx_pp, DECL_NAME (p)); else - pp_cxx_canonical_template_parameter (cxx_pp, TREE_TYPE (p)); + pp_cxx_canonical_template_parameter (cxx_pp, TREE_TYPE (p)); } else dump_decl (p, flags | TFF_DECL_SPECIFIERS); @@ -191,9 +191,9 @@ dump_template_parameter (tree parm, int flags) pp_equal (cxx_pp); pp_cxx_whitespace (cxx_pp); if (TREE_CODE (p) == TYPE_DECL || TREE_CODE (p) == TEMPLATE_DECL) - dump_type (a, flags & ~TFF_CHASE_TYPEDEF); + dump_type (a, flags & ~TFF_CHASE_TYPEDEF); else - dump_expr (a, flags | TFF_EXPR_IN_PARENS); + dump_expr (a, flags | TFF_EXPR_IN_PARENS); } } @@ -228,9 +228,9 @@ dump_template_bindings (tree parms, tree args) if (need_comma) pp_separate_with_comma (cxx_pp); dump_template_parameter (TREE_VEC_ELT (p, i), TFF_PLAIN_IDENTIFIER); - pp_cxx_whitespace (cxx_pp); - pp_equal (cxx_pp); - pp_cxx_whitespace (cxx_pp); + pp_cxx_whitespace (cxx_pp); + pp_equal (cxx_pp); + pp_cxx_whitespace (cxx_pp); if (arg) dump_template_argument (arg, TFF_PLAIN_IDENTIFIER); else @@ -283,11 +283,11 @@ dump_type (tree t, int flags) case TYPE_DECL: if (flags & TFF_CHASE_TYPEDEF) - { - dump_type (DECL_ORIGINAL_TYPE (t) - ? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), flags); - break; - } + { + dump_type (DECL_ORIGINAL_TYPE (t) + ? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), flags); + break; + } /* Else fall through. */ case TEMPLATE_DECL: @@ -309,7 +309,7 @@ dump_type (tree t, int flags) if (TYPE_IDENTIFIER (t)) pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t)); else - pp_cxx_canonical_template_parameter (cxx_pp, t); + pp_cxx_canonical_template_parameter (cxx_pp, t); break; case BOUND_TEMPLATE_TEMPLATE_PARM: @@ -318,7 +318,7 @@ dump_type (tree t, int flags) pp_cxx_cv_qualifier_seq (cxx_pp, t); pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t)); pp_cxx_begin_template_argument_list (cxx_pp); - dump_template_argument_list (args, flags); + dump_template_argument_list (args, flags); pp_cxx_end_template_argument_list (cxx_pp); } break; @@ -328,8 +328,8 @@ dump_type (tree t, int flags) if (TYPE_IDENTIFIER (t)) pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t)); else - pp_cxx_canonical_template_parameter - (cxx_pp, TEMPLATE_TYPE_PARM_INDEX (t)); + pp_cxx_canonical_template_parameter + (cxx_pp, TEMPLATE_TYPE_PARM_INDEX (t)); break; /* This is not always necessary for pointers and such, but doing this @@ -436,38 +436,38 @@ dump_aggr_type (tree t, int flags) { typdef = !DECL_ARTIFICIAL (name); tmplate = !typdef && TREE_CODE (t) != ENUMERAL_TYPE - && TYPE_LANG_SPECIFIC (t) && CLASSTYPE_TEMPLATE_INFO (t) - && (CLASSTYPE_TEMPLATE_SPECIALIZATION (t) - || TREE_CODE (CLASSTYPE_TI_TEMPLATE (t)) != TEMPLATE_DECL - || DECL_TEMPLATE_SPECIALIZATION (CLASSTYPE_TI_TEMPLATE (t)) - || PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t))); + && TYPE_LANG_SPECIFIC (t) && CLASSTYPE_TEMPLATE_INFO (t) + && (CLASSTYPE_TEMPLATE_SPECIALIZATION (t) + || TREE_CODE (CLASSTYPE_TI_TEMPLATE (t)) != TEMPLATE_DECL + || DECL_TEMPLATE_SPECIALIZATION (CLASSTYPE_TI_TEMPLATE (t)) + || PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t))); dump_scope (CP_DECL_CONTEXT (name), flags | TFF_SCOPE); if (tmplate) - { - /* Because the template names are mangled, we have to locate - the most general template, and use that name. */ - tree tpl = CLASSTYPE_TI_TEMPLATE (t); - - while (DECL_TEMPLATE_INFO (tpl)) - tpl = DECL_TI_TEMPLATE (tpl); - name = tpl; - } + { + /* Because the template names are mangled, we have to locate + the most general template, and use that name. */ + tree tpl = CLASSTYPE_TI_TEMPLATE (t); + + while (DECL_TEMPLATE_INFO (tpl)) + tpl = DECL_TI_TEMPLATE (tpl); + name = tpl; + } name = DECL_NAME (name); } if (name == 0 || ANON_AGGRNAME_P (name)) { if (flags & TFF_CLASS_KEY_OR_ENUM) - pp_identifier (cxx_pp, "<anonymous>"); + pp_identifier (cxx_pp, "<anonymous>"); else - pp_printf (pp_base (cxx_pp), "<anonymous %s>", variety); + pp_printf (pp_base (cxx_pp), "<anonymous %s>", variety); } else pp_cxx_tree_identifier (cxx_pp, name); if (tmplate) dump_template_parms (TYPE_TEMPLATE_INFO (t), - !CLASSTYPE_USE_TEMPLATE (t), - flags & ~TFF_TEMPLATE_HEADER); + !CLASSTYPE_USE_TEMPLATE (t), + flags & ~TFF_TEMPLATE_HEADER); } /* Dump into the obstack the initial part of the output for a given type. @@ -504,8 +504,8 @@ dump_type_prefix (tree t, int flags) pp_cxx_left_paren (cxx_pp); } pp_character (cxx_pp, "&*"[TREE_CODE (t) == POINTER_TYPE]); - pp_base (cxx_pp)->padding = pp_before; - pp_cxx_cv_qualifier_seq (cxx_pp, t); + pp_base (cxx_pp)->padding = pp_before; + pp_cxx_cv_qualifier_seq (cxx_pp, t); } break; @@ -514,9 +514,9 @@ dump_type_prefix (tree t, int flags) dump_type_prefix (TREE_TYPE (t), flags); if (TREE_CODE (t) == OFFSET_TYPE) /* pmfs deal with this in d_t_p */ { - pp_maybe_space (cxx_pp); - if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE) - pp_cxx_left_paren (cxx_pp); + pp_maybe_space (cxx_pp); + if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE) + pp_cxx_left_paren (cxx_pp); dump_type (TYPE_OFFSET_BASETYPE (t), flags); pp_cxx_colon_colon (cxx_pp); } @@ -526,7 +526,7 @@ dump_type_prefix (tree t, int flags) break; /* Can only be reached through function pointer -- this would not be - correct if FUNCTION_DECLs used it. */ + correct if FUNCTION_DECLs used it. */ case FUNCTION_TYPE: dump_type_prefix (TREE_TYPE (t), flags); pp_maybe_space (cxx_pp); @@ -601,7 +601,7 @@ dump_type_suffix (tree t, int flags) case METHOD_TYPE: { tree arg; - pp_cxx_right_paren (cxx_pp); + pp_cxx_right_paren (cxx_pp); arg = TYPE_ARG_TYPES (t); if (TREE_CODE (t) == METHOD_TYPE) arg = TREE_CHAIN (arg); @@ -611,10 +611,10 @@ dump_type_suffix (tree t, int flags) dump_parameters (arg, flags & ~TFF_FUNCTION_DEFAULT_ARGUMENTS); if (TREE_CODE (t) == METHOD_TYPE) - pp_cxx_cv_qualifier_seq - (cxx_pp, TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t)))); - else - pp_cxx_cv_qualifier_seq(cxx_pp, t); + pp_cxx_cv_qualifier_seq + (cxx_pp, TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t)))); + else + pp_cxx_cv_qualifier_seq(cxx_pp, t); dump_exception_spec (TYPE_RAISES_EXCEPTIONS (t), flags); dump_type_suffix (TREE_TYPE (t), flags); break; @@ -627,15 +627,15 @@ dump_type_suffix (tree t, int flags) { if (host_integerp (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0)) pp_wide_integer - (cxx_pp, tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0) + 1); + (cxx_pp, tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0) + 1); else if (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (t))) == MINUS_EXPR) dump_expr (TREE_OPERAND (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0), - flags & ~TFF_EXPR_IN_PARENS); + flags & ~TFF_EXPR_IN_PARENS); else dump_expr (fold (cp_build_binary_op (PLUS_EXPR, TYPE_MAX_VALUE (TYPE_DOMAIN (t)), integer_one_node)), - flags & ~TFF_EXPR_IN_PARENS); + flags & ~TFF_EXPR_IN_PARENS); } pp_cxx_right_bracket (cxx_pp); dump_type_suffix (TREE_TYPE (t), flags); @@ -666,7 +666,7 @@ dump_type_suffix (tree t, int flags) pp_unsupported_tree (cxx_pp, t); case ERROR_MARK: /* Don't mark it here, we should have already done in - dump_type_prefix. */ + dump_type_prefix. */ break; } } @@ -730,7 +730,7 @@ dump_decl (tree t, int flags) pp_cxx_identifier (cxx_pp, "typedef"); dump_simple_decl (t, DECL_ORIGINAL_TYPE (t) ? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), - flags); + flags); break; case VAR_DECL: @@ -755,15 +755,15 @@ dump_decl (tree t, int flags) case NAMESPACE_DECL: if (flags & TFF_DECL_SPECIFIERS) - pp_cxx_declaration (cxx_pp, t); + pp_cxx_declaration (cxx_pp, t); else - { - dump_scope (CP_DECL_CONTEXT (t), flags); - if (DECL_NAME (t) == NULL_TREE) - pp_identifier (cxx_pp, "<unnamed>"); - else - pp_cxx_tree_identifier (cxx_pp, DECL_NAME (t)); - } + { + dump_scope (CP_DECL_CONTEXT (t), flags); + if (DECL_NAME (t) == NULL_TREE) + pp_identifier (cxx_pp, "<unnamed>"); + else + pp_cxx_tree_identifier (cxx_pp, DECL_NAME (t)); + } break; case SCOPE_REF: @@ -786,7 +786,7 @@ dump_decl (tree t, int flags) case BIT_NOT_EXPR: /* This is a pseudo destructor call which has not been folded into - a PSEUDO_DTOR_EXPR yet. */ + a PSEUDO_DTOR_EXPR yet. */ pp_cxx_complement (cxx_pp); dump_type (TREE_OPERAND (t, 0), flags); break; @@ -816,12 +816,12 @@ dump_decl (tree t, int flags) if (DECL_CLASS_SCOPE_P (t)) { dump_type (DECL_CONTEXT (t), flags); - pp_cxx_colon_colon (cxx_pp); + pp_cxx_colon_colon (cxx_pp); } else if (DECL_CONTEXT (t)) { dump_decl (DECL_CONTEXT (t), flags); - pp_cxx_colon_colon (cxx_pp); + pp_cxx_colon_colon (cxx_pp); } dump_decl (DECL_NAME (t), flags); break; @@ -838,7 +838,7 @@ dump_decl (tree t, int flags) else if (DECL_GLOBAL_CTOR_P (t) || DECL_GLOBAL_DTOR_P (t)) dump_global_iord (t); else - dump_function_decl (t, flags); + dump_function_decl (t, flags); break; case TEMPLATE_DECL: @@ -893,9 +893,9 @@ dump_decl (tree t, int flags) case TEMPLATE_TYPE_PARM: if (flags & TFF_DECL_SPECIFIERS) - pp_cxx_declaration (cxx_pp, t); + pp_cxx_declaration (cxx_pp, t); else - pp_type_id (cxx_pp, t); + pp_type_id (cxx_pp, t); break; default: @@ -921,28 +921,28 @@ dump_template_decl (tree t, int flags) if (flags & TFF_TEMPLATE_HEADER) { for (parms = orig_parms = nreverse (orig_parms); - parms; - parms = TREE_CHAIN (parms)) - { + parms; + parms = TREE_CHAIN (parms)) + { tree inner_parms = INNERMOST_TEMPLATE_PARMS (parms); - int len = TREE_VEC_LENGTH (inner_parms); + int len = TREE_VEC_LENGTH (inner_parms); - pp_cxx_identifier (cxx_pp, "template"); - pp_cxx_begin_template_argument_list (cxx_pp); + pp_cxx_identifier (cxx_pp, "template"); + pp_cxx_begin_template_argument_list (cxx_pp); /* If we've shown the template prefix, we'd better show the parameters' and decl's type too. */ flags |= TFF_DECL_SPECIFIERS; - for (i = 0; i < len; i++) - { - if (i) - pp_separate_with_comma (cxx_pp); - dump_template_parameter (TREE_VEC_ELT (inner_parms, i), flags); - } - pp_cxx_end_template_argument_list (cxx_pp); - pp_cxx_whitespace (cxx_pp); - } + for (i = 0; i < len; i++) + { + if (i) + pp_separate_with_comma (cxx_pp); + dump_template_parameter (TREE_VEC_ELT (inner_parms, i), flags); + } + pp_cxx_end_template_argument_list (cxx_pp); + pp_cxx_whitespace (cxx_pp); + } nreverse(orig_parms); if (DECL_TEMPLATE_TEMPLATE_PARM_P (t)) @@ -952,8 +952,8 @@ dump_template_decl (tree t, int flags) if (TREE_CODE (DECL_TEMPLATE_RESULT (t)) == TYPE_DECL) dump_type (TREE_TYPE (t), - ((flags & ~TFF_CLASS_KEY_OR_ENUM) | TFF_TEMPLATE_NAME - | (flags & TFF_DECL_SPECIFIERS ? TFF_CLASS_KEY_OR_ENUM : 0))); + ((flags & ~TFF_CLASS_KEY_OR_ENUM) | TFF_TEMPLATE_NAME + | (flags & TFF_DECL_SPECIFIERS ? TFF_CLASS_KEY_OR_ENUM : 0))); else if (TREE_CODE (DECL_TEMPLATE_RESULT (t)) == VAR_DECL) dump_decl (DECL_TEMPLATE_RESULT (t), flags | TFF_TEMPLATE_NAME); else @@ -1026,7 +1026,7 @@ dump_function_decl (tree t, int flags) /* Print the return type? */ if (show_return) show_return = !DECL_CONV_FN_P (t) && !DECL_CONSTRUCTOR_P (t) - && !DECL_DESTRUCTOR_P (t); + && !DECL_DESTRUCTOR_P (t); if (show_return) dump_type_prefix (TREE_TYPE (fntype), flags); @@ -1046,17 +1046,17 @@ dump_function_decl (tree t, int flags) dump_parameters (parmtypes, flags); if (TREE_CODE (fntype) == METHOD_TYPE) - { - pp_base (cxx_pp)->padding = pp_before; - pp_cxx_cv_qualifier_seq - (cxx_pp, TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype)))); - } + { + pp_base (cxx_pp)->padding = pp_before; + pp_cxx_cv_qualifier_seq + (cxx_pp, TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype)))); + } if (flags & TFF_EXCEPTION_SPECIFICATION) - { - pp_base (cxx_pp)->padding = pp_before; - dump_exception_spec (TYPE_RAISES_EXCEPTIONS (fntype), flags); - } + { + pp_base (cxx_pp)->padding = pp_before; + dump_exception_spec (TYPE_RAISES_EXCEPTIONS (fntype), flags); + } if (show_return) dump_type_suffix (TREE_TYPE (fntype), flags); @@ -1089,22 +1089,22 @@ dump_parameters (tree parmtypes, int flags) parmtypes = TREE_CHAIN (parmtypes)) { if (!first) - pp_separate_with_comma (cxx_pp); + pp_separate_with_comma (cxx_pp); first = 0; if (!parmtypes) - { - pp_cxx_identifier (cxx_pp, "..."); - break; - } + { + pp_cxx_identifier (cxx_pp, "..."); + break; + } dump_type (TREE_VALUE (parmtypes), flags); if ((flags & TFF_FUNCTION_DEFAULT_ARGUMENTS) && TREE_PURPOSE (parmtypes)) - { - pp_cxx_whitespace (cxx_pp); - pp_equal (cxx_pp); - pp_cxx_whitespace (cxx_pp); - dump_expr (TREE_PURPOSE (parmtypes), flags | TFF_EXPR_IN_PARENS); - } + { + pp_cxx_whitespace (cxx_pp); + pp_equal (cxx_pp); + pp_cxx_whitespace (cxx_pp); + dump_expr (TREE_PURPOSE (parmtypes), flags | TFF_EXPR_IN_PARENS); + } } pp_cxx_right_paren (cxx_pp); @@ -1121,14 +1121,14 @@ dump_exception_spec (tree t, int flags) pp_cxx_whitespace (cxx_pp); pp_cxx_left_paren (cxx_pp); if (TREE_VALUE (t) != NULL_TREE) - while (1) - { - dump_type (TREE_VALUE (t), flags); - t = TREE_CHAIN (t); - if (!t) - break; - pp_separate_with_comma (cxx_pp); - } + while (1) + { + dump_type (TREE_VALUE (t), flags); + t = TREE_CHAIN (t); + if (!t) + break; + pp_separate_with_comma (cxx_pp); + } pp_cxx_right_paren (cxx_pp); } } @@ -1218,17 +1218,17 @@ dump_template_parms (tree info, int primary, int flags) len = TREE_VEC_LENGTH (args); for (ix = 0; ix != len; ix++) - { - tree arg = TREE_VEC_ELT (args, ix); + { + tree arg = TREE_VEC_ELT (args, ix); - if (ix) - pp_separate_with_comma (cxx_pp); + if (ix) + pp_separate_with_comma (cxx_pp); - if (!arg) - pp_identifier (cxx_pp, "<template parameter error>"); - else - dump_template_argument (arg, flags); - } + if (!arg) + pp_identifier (cxx_pp, "<template parameter error>"); + else + dump_template_argument (arg, flags); + } } else if (primary) { @@ -1240,14 +1240,14 @@ dump_template_parms (tree info, int primary, int flags) len = parms ? TREE_VEC_LENGTH (parms) : 0; for (ix = 0; ix != len; ix++) - { - tree parm = TREE_VALUE (TREE_VEC_ELT (parms, ix)); + { + tree parm = TREE_VALUE (TREE_VEC_ELT (parms, ix)); - if (ix) - pp_separate_with_comma (cxx_pp); + if (ix) + pp_separate_with_comma (cxx_pp); - dump_decl (parm, flags & ~TFF_DECL_SPECIFIERS); - } + dump_decl (parm, flags & ~TFF_DECL_SPECIFIERS); + } } pp_cxx_end_template_argument_list (cxx_pp); } @@ -1335,11 +1335,11 @@ dump_expr (tree t, int flags) if (TREE_HAS_CONSTRUCTOR (t)) { pp_cxx_identifier (cxx_pp, "new"); - pp_cxx_whitespace (cxx_pp); + pp_cxx_whitespace (cxx_pp); dump_type (TREE_TYPE (TREE_TYPE (t)), flags); } else - dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS); + dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS); break; case AGGR_INIT_EXPR: @@ -1401,14 +1401,14 @@ dump_expr (tree t, int flags) tree type = TREE_OPERAND (t, 1); tree init = TREE_OPERAND (t, 2); if (NEW_EXPR_USE_GLOBAL (t)) - pp_cxx_colon_colon (cxx_pp); + pp_cxx_colon_colon (cxx_pp); pp_cxx_identifier (cxx_pp, "new"); if (TREE_OPERAND (t, 0)) { pp_cxx_left_paren (cxx_pp); dump_expr_list (TREE_OPERAND (t, 0), flags); - pp_cxx_right_paren (cxx_pp); - pp_cxx_whitespace (cxx_pp); + pp_cxx_right_paren (cxx_pp); + pp_cxx_whitespace (cxx_pp); } if (TREE_CODE (type) == ARRAY_REF) type = build_cplus_array_type @@ -1579,11 +1579,11 @@ dump_expr (tree t, int flags) if (TREE_CODE (next) == FUNCTION_TYPE) { if (flags & TFF_EXPR_IN_PARENS) - pp_cxx_left_paren (cxx_pp); + pp_cxx_left_paren (cxx_pp); pp_cxx_star (cxx_pp); dump_expr (TREE_OPERAND (t, 0), flags & ~TFF_EXPR_IN_PARENS); if (flags & TFF_EXPR_IN_PARENS) - pp_cxx_right_paren (cxx_pp); + pp_cxx_right_paren (cxx_pp); break; } /* Else fall through. */ @@ -1622,12 +1622,12 @@ dump_expr (tree t, int flags) if (integer_zerop (idx)) { /* A NULL pointer-to-member constant. */ - pp_cxx_left_paren (cxx_pp); - pp_cxx_left_paren (cxx_pp); + pp_cxx_left_paren (cxx_pp); + pp_cxx_left_paren (cxx_pp); dump_type (TREE_TYPE (t), flags); - pp_cxx_right_paren (cxx_pp); - pp_character (cxx_pp, '0'); - pp_cxx_right_paren (cxx_pp); + pp_cxx_right_paren (cxx_pp); + pp_character (cxx_pp, '0'); + pp_cxx_right_paren (cxx_pp); break; } else if (host_integerp (idx, 0)) @@ -1653,7 +1653,7 @@ dump_expr (tree t, int flags) if (virtuals) { dump_expr (BV_FN (virtuals), - flags | TFF_EXPR_IN_PARENS); + flags | TFF_EXPR_IN_PARENS); break; } } @@ -1661,14 +1661,14 @@ dump_expr (tree t, int flags) if (TREE_TYPE (t) && !CONSTRUCTOR_ELTS (t)) { dump_type (TREE_TYPE (t), 0); - pp_cxx_left_paren (cxx_pp); - pp_cxx_right_paren (cxx_pp); + pp_cxx_left_paren (cxx_pp); + pp_cxx_right_paren (cxx_pp); } else { - pp_cxx_left_brace (cxx_pp); + pp_cxx_left_brace (cxx_pp); dump_expr_list (CONSTRUCTOR_ELTS (t), flags); - pp_cxx_right_brace (cxx_pp); + pp_cxx_right_brace (cxx_pp); } break; @@ -1693,14 +1693,14 @@ dump_expr (tree t, int flags) if (TREE_CODE (ob) == INDIRECT_REF) { dump_expr (TREE_OPERAND (ob, 0), flags | TFF_EXPR_IN_PARENS); - pp_cxx_arrow (cxx_pp); - pp_cxx_star (cxx_pp); + pp_cxx_arrow (cxx_pp); + pp_cxx_star (cxx_pp); } else { dump_expr (ob, flags | TFF_EXPR_IN_PARENS); - pp_cxx_dot (cxx_pp); - pp_cxx_star (cxx_pp); + pp_cxx_dot (cxx_pp); + pp_cxx_star (cxx_pp); } dump_expr (TREE_OPERAND (t, 1), flags | TFF_EXPR_IN_PARENS); } @@ -1728,8 +1728,8 @@ dump_expr (tree t, int flags) { pp_cxx_left_paren (cxx_pp); dump_type (TREE_TYPE (t), flags); - pp_cxx_right_paren (cxx_pp); - pp_cxx_left_paren (cxx_pp); + pp_cxx_right_paren (cxx_pp); + pp_cxx_left_paren (cxx_pp); dump_expr_list (TREE_OPERAND (t, 0), flags); pp_cxx_right_paren (cxx_pp); } @@ -1763,7 +1763,7 @@ dump_expr (tree t, int flags) case SIZEOF_EXPR: case ALIGNOF_EXPR: if (TREE_CODE (t) == SIZEOF_EXPR) - pp_cxx_identifier (cxx_pp, "sizeof"); + pp_cxx_identifier (cxx_pp, "sizeof"); else { gcc_assert (TREE_CODE (t) == ALIGNOF_EXPR); @@ -1774,7 +1774,7 @@ dump_expr (tree t, int flags) if (TYPE_P (TREE_OPERAND (t, 0))) dump_type (TREE_OPERAND (t, 0), flags); else - dump_expr (TREE_OPERAND (t, 0), flags); + dump_expr (TREE_OPERAND (t, 0), flags); pp_cxx_right_paren (cxx_pp); break; @@ -2111,7 +2111,7 @@ cxx_print_error_function (diagnostic_context *context, const char *file) static void cp_diagnostic_starter (diagnostic_context *context, - diagnostic_info *diagnostic) + diagnostic_info *diagnostic) { diagnostic_report_current_module (context); cp_print_error_function (context, diagnostic); @@ -2121,7 +2121,7 @@ cp_diagnostic_starter (diagnostic_context *context, static void cp_diagnostic_finalizer (diagnostic_context *context, - diagnostic_info *diagnostic ATTRIBUTE_UNUSED) + diagnostic_info *diagnostic ATTRIBUTE_UNUSED) { pp_base_destroy_prefix (context->printer); } @@ -2130,7 +2130,7 @@ cp_diagnostic_finalizer (diagnostic_context *context, a diagnostic message. Called from cp_diagnostic_starter. */ static void cp_print_error_function (diagnostic_context *context, - diagnostic_info *diagnostic) + diagnostic_info *diagnostic) { if (diagnostic_last_function_changed (context)) { @@ -2141,11 +2141,11 @@ cp_print_error_function (diagnostic_context *context, pp_base_set_prefix (context->printer, new_prefix); if (current_function_decl == NULL) - pp_base_string (context->printer, "At global scope:"); + pp_base_string (context->printer, "At global scope:"); else - pp_printf (context->printer, "In %s %qs:", - function_category (current_function_decl), - cxx_printable_name (current_function_decl, 2)); + pp_printf (context->printer, "In %s %qs:", + function_category (current_function_decl), + cxx_printable_name (current_function_decl, 2)); pp_base_newline (context->printer); diagnostic_set_last_function (context); @@ -2161,15 +2161,15 @@ function_category (tree fn) if (DECL_FUNCTION_MEMBER_P (fn)) { if (DECL_STATIC_FUNCTION_P (fn)) - return "static member function"; + return "static member function"; else if (DECL_COPY_CONSTRUCTOR_P (fn)) - return "copy constructor"; + return "copy constructor"; else if (DECL_CONSTRUCTOR_P (fn)) - return "constructor"; + return "constructor"; else if (DECL_DESTRUCTOR_P (fn)) - return "destructor"; + return "destructor"; else - return "member function"; + return "member function"; } else return "function"; @@ -2197,10 +2197,10 @@ print_instantiation_full_context (diagnostic_context *context) /* Avoid redundancy with the "In function" line. */; else pp_verbatim (context->printer, - "%s: In instantiation of %qs:\n", + "%s: In instantiation of %qs:\n", LOCATION_FILE (location), - decl_as_string (TINST_DECL (p), - TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE)); + decl_as_string (TINST_DECL (p), + TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE)); location = TINST_LOCATION (p); p = TREE_CHAIN (p); @@ -2213,7 +2213,7 @@ print_instantiation_full_context (diagnostic_context *context) /* Same as above but less verbose. */ static void print_instantiation_partial_context (diagnostic_context *context, - tree t, location_t loc) + tree t, location_t loc) { expanded_location xloc; for (; ; t = TREE_CHAIN (t)) @@ -2222,13 +2222,13 @@ print_instantiation_partial_context (diagnostic_context *context, if (t == NULL_TREE) break; pp_verbatim (context->printer, "%s:%d: instantiated from %qs\n", - xloc.file, xloc.line, - decl_as_string (TINST_DECL (t), - TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE)); + xloc.file, xloc.line, + decl_as_string (TINST_DECL (t), + TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE)); loc = TINST_LOCATION (t); } pp_verbatim (context->printer, "%s:%d: instantiated from here\n", - xloc.file, xloc.line); + xloc.file, xloc.line); } /* Called from cp_thing to print the template context for an error. */ @@ -2285,14 +2285,14 @@ cp_printer (pretty_printer *pp, text_info *text) switch (*text->format_spec) { case 'A': result = args_to_string (next_tree, verbose); break; - case 'C': result = code_to_string (next_tcode); break; + case 'C': result = code_to_string (next_tcode); break; case 'D': result = decl_to_string (next_tree, verbose); break; - case 'E': result = expr_to_string (next_tree); break; + case 'E': result = expr_to_string (next_tree); break; case 'F': result = fndecl_to_string (next_tree, verbose); break; - case 'L': result = language_to_string (next_lang); break; - case 'O': result = op_to_string (next_tcode); break; - case 'P': result = parm_to_string (next_int); break; - case 'Q': result = assop_to_string (next_tcode); break; + case 'L': result = language_to_string (next_lang); break; + case 'O': result = op_to_string (next_tcode); break; + case 'P': result = parm_to_string (next_int); break; + case 'Q': result = assop_to_string (next_tcode); break; case 'T': result = type_to_string (next_tree, verbose); break; case 'V': result = cv_to_string (next_tree, verbose); break; @@ -2323,14 +2323,14 @@ locate_error (const char *gmsgid, va_list ap) plus = 0; if (*f == '%') { - if (*++f == 'q') - ++f; /* ignore quoting flag. */ + if (*++f == 'q') + ++f; /* ignore quoting flag. */ if (*f == '+') - { - ++f; - plus = 1; - } + { + ++f; + plus = 1; + } if (*f == '#') f++; @@ -2386,10 +2386,10 @@ cp_error_at (const char *gmsgid, ...) va_start (ap, gmsgid); diagnostic_set_info (&diagnostic, gmsgid, &ap, - input_location, DK_ERROR); + input_location, DK_ERROR); cp_diagnostic_starter (global_dc, &diagnostic); diagnostic_set_info (&diagnostic, gmsgid, &ap, - location_of (here), DK_ERROR); + location_of (here), DK_ERROR); report_diagnostic (&diagnostic); va_end (ap); } @@ -2407,7 +2407,7 @@ cp_warning_at (const char *gmsgid, ...) va_start (ap, gmsgid); diagnostic_set_info (&diagnostic, gmsgid, &ap, - location_of (here), DK_WARNING); + location_of (here), DK_WARNING); report_diagnostic (&diagnostic); va_end (ap); } @@ -2425,7 +2425,7 @@ cp_pedwarn_at (const char *gmsgid, ...) va_start (ap, gmsgid); diagnostic_set_info (&diagnostic, gmsgid, &ap, - location_of (here), pedantic_error_kind()); + location_of (here), pedantic_error_kind()); report_diagnostic (&diagnostic); va_end (ap); } |