Commit 43e1e8b5 by Jason Merrill

Remove trailing whitespace in C++ front end.

From-SVN: r272809
parent ee62a32f
...@@ -734,7 +734,7 @@ struct GTY(()) tree_overload { ...@@ -734,7 +734,7 @@ struct GTY(()) tree_overload {
/* Iterator for a 1 dimensional overload. Permits iterating over the /* Iterator for a 1 dimensional overload. Permits iterating over the
outer level of a 2-d overload when explicitly enabled. */ outer level of a 2-d overload when explicitly enabled. */
class ovl_iterator class ovl_iterator
{ {
tree ovl; tree ovl;
const bool allow_inner; /* Only used when checking. */ const bool allow_inner; /* Only used when checking. */
...@@ -1296,7 +1296,7 @@ enum cp_trait_kind ...@@ -1296,7 +1296,7 @@ enum cp_trait_kind
struct GTY (()) tree_trait_expr { struct GTY (()) tree_trait_expr {
struct tree_common common; struct tree_common common;
tree type1; tree type1;
tree type2; tree type2;
enum cp_trait_kind kind; enum cp_trait_kind kind;
}; };
...@@ -1613,7 +1613,7 @@ union GTY((desc ("cp_tree_node_structure (&%h)"), ...@@ -1613,7 +1613,7 @@ union GTY((desc ("cp_tree_node_structure (&%h)"),
struct tree_deferred_parse GTY ((tag ("TS_CP_DEFERRED_PARSE"))) deferred_parse; struct tree_deferred_parse GTY ((tag ("TS_CP_DEFERRED_PARSE"))) deferred_parse;
struct tree_deferred_noexcept GTY ((tag ("TS_CP_DEFERRED_NOEXCEPT"))) deferred_noexcept; struct tree_deferred_noexcept GTY ((tag ("TS_CP_DEFERRED_NOEXCEPT"))) deferred_noexcept;
struct lang_identifier GTY ((tag ("TS_CP_IDENTIFIER"))) identifier; struct lang_identifier GTY ((tag ("TS_CP_IDENTIFIER"))) identifier;
struct tree_static_assert GTY ((tag ("TS_CP_STATIC_ASSERT"))) struct tree_static_assert GTY ((tag ("TS_CP_STATIC_ASSERT")))
static_assertion; static_assertion;
struct tree_argument_pack_select GTY ((tag ("TS_CP_ARGUMENT_PACK_SELECT"))) struct tree_argument_pack_select GTY ((tag ("TS_CP_ARGUMENT_PACK_SELECT")))
argument_pack_select; argument_pack_select;
...@@ -3680,7 +3680,7 @@ struct GTY(()) lang_decl { ...@@ -3680,7 +3680,7 @@ struct GTY(()) lang_decl {
select. */ select. */
#define ARGUMENT_PACK_SELECT_INDEX(NODE) \ #define ARGUMENT_PACK_SELECT_INDEX(NODE) \
(((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->index) (((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->index)
#define FOLD_EXPR_CHECK(NODE) \ #define FOLD_EXPR_CHECK(NODE) \
TREE_CHECK4 (NODE, UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, \ TREE_CHECK4 (NODE, UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, \
BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR) BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR)
...@@ -4080,7 +4080,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) ...@@ -4080,7 +4080,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
/* [basic.fundamental] /* [basic.fundamental]
Integral and floating types are collectively called arithmetic Integral and floating types are collectively called arithmetic
types. types.
As a GNU extension, we also accept complex types. As a GNU extension, we also accept complex types.
...@@ -4098,7 +4098,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) ...@@ -4098,7 +4098,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
Arithmetic types, enumeration types, pointer types, Arithmetic types, enumeration types, pointer types,
pointer-to-member types, and std::nullptr_t are collectively called pointer-to-member types, and std::nullptr_t are collectively called
scalar types. scalar types.
Keep these checks in ascending code order. */ Keep these checks in ascending code order. */
#define SCALAR_TYPE_P(TYPE) \ #define SCALAR_TYPE_P(TYPE) \
(TYPE_PTRDATAMEM_P (TYPE) \ (TYPE_PTRDATAMEM_P (TYPE) \
...@@ -4118,7 +4118,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) ...@@ -4118,7 +4118,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
Scoped enumeration types are different from normal (unscoped) Scoped enumeration types are different from normal (unscoped)
enumeration types in several ways: enumeration types in several ways:
- The enumerators of a scoped enumeration type are only available - The enumerators of a scoped enumeration type are only available
within the scope of the enumeration type and not in the within the scope of the enumeration type and not in the
enclosing scope. For example, the Red color can be referred to enclosing scope. For example, the Red color can be referred to
...@@ -4581,7 +4581,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) ...@@ -4581,7 +4581,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
parameter). The TREE_PURPOSE is the default value, if any. The parameter). The TREE_PURPOSE is the default value, if any. The
TEMPLATE_PARM_INDEX for the parameter is available as the TEMPLATE_PARM_INDEX for the parameter is available as the
DECL_INITIAL (for a PARM_DECL) or as the TREE_TYPE (for a DECL_INITIAL (for a PARM_DECL) or as the TREE_TYPE (for a
TYPE_DECL). TYPE_DECL).
FIXME: CONST_CAST_TREE is a hack that hopefully will go away after FIXME: CONST_CAST_TREE is a hack that hopefully will go away after
tree is converted to C++ class hiearchy. */ tree is converted to C++ class hiearchy. */
...@@ -4733,18 +4733,18 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) ...@@ -4733,18 +4733,18 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
template <> int min<int> (int, int), template <> int min<int> (int, int),
3=explicit instantiation, e.g.: 3=explicit instantiation, e.g.:
template int min<int> (int, int); template int min<int> (int, int);
Note that NODE will be marked as a specialization even if the Note that NODE will be marked as a specialization even if the
template it is instantiating is not a primary template. For template it is instantiating is not a primary template. For
example, given: example, given:
template <typename T> struct O { template <typename T> struct O {
void f(); void f();
struct I {}; struct I {};
}; };
both O<int>::f and O<int>::I will be marked as instantiations. both O<int>::f and O<int>::I will be marked as instantiations.
If DECL_USE_TEMPLATE is nonzero, then DECL_TEMPLATE_INFO will also If DECL_USE_TEMPLATE is nonzero, then DECL_TEMPLATE_INFO will also
...@@ -6747,7 +6747,7 @@ extern void append_type_to_template_for_access_check (tree, tree, tree, ...@@ -6747,7 +6747,7 @@ extern void append_type_to_template_for_access_check (tree, tree, tree,
extern tree convert_generic_types_to_packs (tree, int, int); extern tree convert_generic_types_to_packs (tree, int, int);
extern tree splice_late_return_type (tree, tree); extern tree splice_late_return_type (tree, tree);
extern bool is_auto (const_tree); extern bool is_auto (const_tree);
extern tree process_template_parm (tree, location_t, tree, extern tree process_template_parm (tree, location_t, tree,
bool, bool); bool, bool);
extern tree end_template_parm_list (tree); extern tree end_template_parm_list (tree);
extern void end_template_parm_list (void); extern void end_template_parm_list (void);
...@@ -7404,7 +7404,7 @@ extern tree cp_build_unary_op (enum tree_code, tree, bool, ...@@ -7404,7 +7404,7 @@ extern tree cp_build_unary_op (enum tree_code, tree, bool,
tsubst_flags_t); tsubst_flags_t);
extern tree genericize_compound_lvalue (tree); extern tree genericize_compound_lvalue (tree);
extern tree unary_complex_lvalue (enum tree_code, tree); extern tree unary_complex_lvalue (enum tree_code, tree);
extern tree build_x_conditional_expr (location_t, tree, tree, tree, extern tree build_x_conditional_expr (location_t, tree, tree, tree,
tsubst_flags_t); tsubst_flags_t);
extern tree build_x_compound_expr_from_list (tree, expr_list_kind, extern tree build_x_compound_expr_from_list (tree, expr_list_kind,
tsubst_flags_t); tsubst_flags_t);
...@@ -7449,7 +7449,7 @@ extern void expand_ptrmemfunc_cst (tree, tree *, tree *); ...@@ -7449,7 +7449,7 @@ extern void expand_ptrmemfunc_cst (tree, tree *, tree *);
extern tree type_after_usual_arithmetic_conversions (tree, tree); extern tree type_after_usual_arithmetic_conversions (tree, tree);
extern tree common_pointer_type (tree, tree); extern tree common_pointer_type (tree, tree);
extern tree composite_pointer_type (tree, tree, tree, tree, extern tree composite_pointer_type (tree, tree, tree, tree,
composite_pointer_operation, composite_pointer_operation,
tsubst_flags_t); tsubst_flags_t);
extern tree merge_types (tree, tree); extern tree merge_types (tree, tree);
extern tree strip_array_domain (tree); extern tree strip_array_domain (tree);
......
...@@ -3023,7 +3023,6 @@ pp_cxx_constraint (cxx_pretty_printer *pp, tree t) ...@@ -3023,7 +3023,6 @@ pp_cxx_constraint (cxx_pretty_printer *pp, tree t)
} }
} }
typedef c_pretty_print_fn pp_fun; typedef c_pretty_print_fn pp_fun;
......
...@@ -686,7 +686,7 @@ finish_expr_stmt (tree expr) ...@@ -686,7 +686,7 @@ finish_expr_stmt (tree expr)
expr = convert_to_void (expr, ICV_STATEMENT, tf_warning_or_error); expr = convert_to_void (expr, ICV_STATEMENT, tf_warning_or_error);
} }
else if (!type_dependent_expression_p (expr)) else if (!type_dependent_expression_p (expr))
convert_to_void (build_non_dependent_expr (expr), ICV_STATEMENT, convert_to_void (build_non_dependent_expr (expr), ICV_STATEMENT,
tf_warning_or_error); tf_warning_or_error);
if (check_for_bare_parameter_packs (expr)) if (check_for_bare_parameter_packs (expr))
...@@ -906,7 +906,7 @@ finish_return_stmt (tree expr) ...@@ -906,7 +906,7 @@ finish_return_stmt (tree expr)
{ {
if (warn_sequence_point) if (warn_sequence_point)
verify_sequence_points (expr); verify_sequence_points (expr);
if (DECL_DESTRUCTOR_P (current_function_decl) if (DECL_DESTRUCTOR_P (current_function_decl)
|| (DECL_CONSTRUCTOR_P (current_function_decl) || (DECL_CONSTRUCTOR_P (current_function_decl)
&& targetm.cxx.cdtor_returns_this ())) && targetm.cxx.cdtor_returns_this ()))
...@@ -1570,7 +1570,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands, ...@@ -1570,7 +1570,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
{ {
constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t))); constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
bool constraint_parsed bool constraint_parsed
= parse_input_constraint (&constraint, i, ninputs, noutputs, 0, = parse_input_constraint (&constraint, i, ninputs, noutputs, 0,
oconstraints, &allows_mem, &allows_reg); oconstraints, &allows_mem, &allows_reg);
/* If the operand is going to end up in memory, don't call /* If the operand is going to end up in memory, don't call
decay_conversion. */ decay_conversion. */
...@@ -2020,7 +2020,7 @@ check_accessibility_of_qualified_id (tree decl, ...@@ -2020,7 +2020,7 @@ check_accessibility_of_qualified_id (tree decl,
its bases. */ its bases. */
qualifying_type = currently_open_derived_class (scope); qualifying_type = currently_open_derived_class (scope);
if (qualifying_type if (qualifying_type
/* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM /* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
or similar in a default argument value. */ or similar in a default argument value. */
&& CLASS_TYPE_P (qualifying_type) && CLASS_TYPE_P (qualifying_type)
...@@ -3004,7 +3004,7 @@ finish_template_template_parm (tree aggr, tree identifier) ...@@ -3004,7 +3004,7 @@ finish_template_template_parm (tree aggr, tree identifier)
gcc_assert (DECL_TEMPLATE_PARMS (tmpl)); gcc_assert (DECL_TEMPLATE_PARMS (tmpl));
check_default_tmpl_args (decl, DECL_TEMPLATE_PARMS (tmpl), check_default_tmpl_args (decl, DECL_TEMPLATE_PARMS (tmpl),
/*is_primary=*/true, /*is_partial=*/false, /*is_primary=*/true, /*is_partial=*/false,
/*is_friend=*/0); /*is_friend=*/0);
...@@ -3379,7 +3379,7 @@ baselink_for_fns (tree fns) ...@@ -3379,7 +3379,7 @@ baselink_for_fns (tree fns)
tree scope; tree scope;
tree cl; tree cl;
if (BASELINK_P (fns) if (BASELINK_P (fns)
|| error_operand_p (fns)) || error_operand_p (fns))
return fns; return fns;
...@@ -3868,7 +3868,7 @@ finish_id_expression_1 (tree id_expression, ...@@ -3868,7 +3868,7 @@ finish_id_expression_1 (tree id_expression,
if (DECL_P (decl) && DECL_NONLOCAL (decl) if (DECL_P (decl) && DECL_NONLOCAL (decl)
&& DECL_CLASS_SCOPE_P (decl)) && DECL_CLASS_SCOPE_P (decl))
{ {
tree context = context_for_name_lookup (decl); tree context = context_for_name_lookup (decl);
if (context != current_class_type) if (context != current_class_type)
{ {
tree path = currently_open_derived_class (context); tree path = currently_open_derived_class (context);
...@@ -8032,7 +8032,7 @@ restore_omp_privatization_clauses (vec<tree> &save) ...@@ -8032,7 +8032,7 @@ restore_omp_privatization_clauses (vec<tree> &save)
save.release (); save.release ();
return; return;
} }
omp_private_member_map = new hash_map <tree, tree>; omp_private_member_map = new hash_map <tree, tree>;
while (!save.is_empty ()) while (!save.is_empty ())
{ {
...@@ -9046,7 +9046,7 @@ finish_omp_atomic (location_t loc, enum tree_code code, enum tree_code opcode, ...@@ -9046,7 +9046,7 @@ finish_omp_atomic (location_t loc, enum tree_code code, enum tree_code opcode,
{ {
if (opcode == NOP_EXPR) if (opcode == NOP_EXPR)
stmt = build2 (MODIFY_EXPR, void_type_node, orig_lhs, orig_rhs); stmt = build2 (MODIFY_EXPR, void_type_node, orig_lhs, orig_rhs);
else else
stmt = build2 (opcode, void_type_node, orig_lhs, orig_rhs); stmt = build2 (opcode, void_type_node, orig_lhs, orig_rhs);
if (orig_rhs1) if (orig_rhs1)
stmt = build_min_nt_loc (EXPR_LOCATION (orig_rhs1), stmt = build_min_nt_loc (EXPR_LOCATION (orig_rhs1),
...@@ -9317,8 +9317,8 @@ init_cp_semantics (void) ...@@ -9317,8 +9317,8 @@ init_cp_semantics (void)
CONDITION and the message text MESSAGE. LOCATION is the location CONDITION and the message text MESSAGE. LOCATION is the location
of the static assertion in the source code. When MEMBER_P, this of the static assertion in the source code. When MEMBER_P, this
static assertion is a member of a class. */ static assertion is a member of a class. */
void void
finish_static_assert (tree condition, tree message, location_t location, finish_static_assert (tree condition, tree message, location_t location,
bool member_p) bool member_p)
{ {
tsubst_flags_t complain = tf_warning_or_error; tsubst_flags_t complain = tf_warning_or_error;
...@@ -9344,7 +9344,7 @@ finish_static_assert (tree condition, tree message, location_t location, ...@@ -9344,7 +9344,7 @@ finish_static_assert (tree condition, tree message, location_t location,
STATIC_ASSERT_SOURCE_LOCATION (assertion) = location; STATIC_ASSERT_SOURCE_LOCATION (assertion) = location;
if (member_p) if (member_p)
maybe_add_class_template_decl_list (current_class_type, maybe_add_class_template_decl_list (current_class_type,
assertion, assertion,
/*friend_p=*/0); /*friend_p=*/0);
else else
...@@ -9362,12 +9362,12 @@ finish_static_assert (tree condition, tree message, location_t location, ...@@ -9362,12 +9362,12 @@ finish_static_assert (tree condition, tree message, location_t location,
if (TREE_CODE (condition) == INTEGER_CST && !integer_zerop (condition)) if (TREE_CODE (condition) == INTEGER_CST && !integer_zerop (condition))
/* Do nothing; the condition is satisfied. */ /* Do nothing; the condition is satisfied. */
; ;
else else
{ {
location_t saved_loc = input_location; location_t saved_loc = input_location;
input_location = location; input_location = location;
if (TREE_CODE (condition) == INTEGER_CST if (TREE_CODE (condition) == INTEGER_CST
&& integer_zerop (condition)) && integer_zerop (condition))
{ {
int sz = TREE_INT_CST_LOW (TYPE_SIZE_UNIT int sz = TREE_INT_CST_LOW (TYPE_SIZE_UNIT
...@@ -9582,7 +9582,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p, ...@@ -9582,7 +9582,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
return type; return type;
} }
/* Called from trait_expr_value to evaluate either __has_nothrow_assign or /* Called from trait_expr_value to evaluate either __has_nothrow_assign or
__has_nothrow_copy, depending on assign_p. Returns true iff all __has_nothrow_copy, depending on assign_p. Returns true iff all
the copy {ctor,assign} fns are nothrow. */ the copy {ctor,assign} fns are nothrow. */
...@@ -9643,7 +9643,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2) ...@@ -9643,7 +9643,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
case CPTK_HAS_NOTHROW_CONSTRUCTOR: case CPTK_HAS_NOTHROW_CONSTRUCTOR:
type1 = strip_array_types (type1); type1 = strip_array_types (type1);
return (trait_expr_value (CPTK_HAS_TRIVIAL_CONSTRUCTOR, type1, type2) return (trait_expr_value (CPTK_HAS_TRIVIAL_CONSTRUCTOR, type1, type2)
|| (CLASS_TYPE_P (type1) || (CLASS_TYPE_P (type1)
&& (t = locate_ctor (type1)) && (t = locate_ctor (type1))
&& maybe_instantiate_noexcept (t) && maybe_instantiate_noexcept (t)
......
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