static void
end_cleanup_fn (void)
{
- expand_or_defer_fn (finish_function (0));
+ expand_or_defer_fn (finish_function (/*inline_p=*/false));
pop_from_top_level ();
}
/* Finish up a function declaration and compile that function
all the way to assembler language output. The free the storage
- for the function definition.
-
- FLAGS is a bitwise or of the following values:
- 2 - INCLASS_INLINE
- We just finished processing the body of an in-class inline
- function definition. (This processing will have taken place
- after the class definition is complete.) */
+ for the function definition. INLINE_P is TRUE if we just
+ finished processing the body of an in-class inline function
+ definition. (This processing will have taken place after the
+ class definition is complete.) */
tree
-finish_function (int flags)
+finish_function (bool inline_p)
{
tree fndecl = current_function_decl;
tree fntype, ctype = NULL_TREE;
- int inclass_inline = (flags & 2) != 0;
/* When we get some parse errors, we can end up without a
current_function_decl, so cope. */
bindings for the template parameters that we added in
maybe_begin_member_template_processing when start_function was
called. */
- if (inclass_inline)
+ if (inline_p)
maybe_end_member_template_processing ();
/* Leave the scope of the class. */
TREE_READONLY (fn) = true;
finish_return_stmt (convert_from_reference (var));
finish_function_body (body);
- expand_or_defer_fn (finish_function (0));
+ expand_or_defer_fn (finish_function (/*inline_p=*/false));
}
/* Start the process of running a particular set of global constructors
/* Finish up. */
finish_compound_stmt (body);
- fn = finish_function (0);
+ fn = finish_function (/*inline_p=*/false);
if (method_type == 'I')
{
{
/* Close out the function. */
finish_compound_stmt (body);
- expand_or_defer_fn (finish_function (0));
+ expand_or_defer_fn (finish_function (/*inline_p=*/false));
}
/* Return the information about the indicated PRIORITY level. If no
finish_then_clause (if_stmt);
finish_if_stmt (if_stmt);
finish_function_body (body);
- expand_or_defer_fn (finish_function (0));
+ expand_or_defer_fn (finish_function (/*inline_p=*/false));
}
/* We're at the end of compilation, so generate any mangling aliases that
tree fn;
finish_compound_stmt (function_body);
- fn = finish_function (0);
+ fn = finish_function (/*inline_p=*/false);
DECL_STATIC_CONSTRUCTOR (fn) = 1;
decl_init_priority_insert (fn, MAX_RESERVED_INIT_PRIORITY - 1);
static vec<constructor_elt, va_gc> *cp_parser_initializer_list
(cp_parser *, bool *);
-static bool cp_parser_ctor_initializer_opt_and_function_body
+static void cp_parser_ctor_initializer_opt_and_function_body
(cp_parser *, bool);
static tree cp_parser_late_parsing_omp_declare_simd
(cp_parser *);
static cp_declarator *cp_parser_conversion_declarator_opt
(cp_parser *);
-static bool cp_parser_ctor_initializer_opt
+static void cp_parser_ctor_initializer_opt
(cp_parser *);
static void cp_parser_mem_initializer_list
(cp_parser *);
static tree cp_parser_try_block
(cp_parser *);
-static bool cp_parser_function_try_block
+static void cp_parser_function_try_block
(cp_parser *);
static void cp_parser_handler_seq
(cp_parser *);
(cp_parser *, cp_token *);
static tree cp_parser_transaction_expression
(cp_parser *, enum rid);
-static bool cp_parser_function_transaction
+static void cp_parser_function_transaction
(cp_parser *, enum rid);
static tree cp_parser_transaction_cancel
(cp_parser *);
/* Parse an (optional) ctor-initializer.
ctor-initializer:
- : mem-initializer-list
+ : mem-initializer-list */
- Returns TRUE iff the ctor-initializer was actually present. */
-
-static bool
+static void
cp_parser_ctor_initializer_opt (cp_parser* parser)
{
/* If the next token is not a `:', then there is no
/* Do default initialization of any bases and members. */
if (DECL_CONSTRUCTOR_P (current_function_decl))
finish_mem_initializers (NULL_TREE);
-
- return false;
+ return;
}
/* Consume the `:' token. */
cp_lexer_consume_token (parser->lexer);
/* And the mem-initializer-list. */
cp_parser_mem_initializer_list (parser);
-
- return true;
}
/* Parse a mem-initializer-list.
true if a ctor-initializer was present. When IN_FUNCTION_TRY_BLOCK
is true we are parsing a function-try-block. */
-static bool
+static void
cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser,
bool in_function_try_block)
{
tree body, list;
- bool ctor_initializer_p;
const bool check_body_p =
DECL_CONSTRUCTOR_P (current_function_decl)
&& DECL_DECLARED_CONSTEXPR_P (current_function_decl);
/* Begin the function body. */
body = begin_function_body ();
/* Parse the optional ctor-initializer. */
- ctor_initializer_p = cp_parser_ctor_initializer_opt (parser);
+ cp_parser_ctor_initializer_opt (parser);
/* If we're parsing a constexpr constructor definition, we need
to check that the constructor body is indeed empty. However,
check_constexpr_ctor_body (last, list, /*complain=*/true);
/* Finish the function body. */
finish_function_body (body);
-
- return ctor_initializer_p;
}
/* Parse an initializer.
function-try-block:
try ctor-initializer [opt] function-body handler-seq */
-static bool
+static void
cp_parser_function_try_block (cp_parser* parser)
{
tree compound_stmt;
tree try_block;
- bool ctor_initializer_p;
/* Look for the `try' keyword. */
if (!cp_parser_require_keyword (parser, RID_TRY, RT_TRY))
- return false;
+ return;
/* Let the rest of the front end know where we are. */
try_block = begin_function_try_block (&compound_stmt);
/* Parse the function-body. */
- ctor_initializer_p = cp_parser_ctor_initializer_opt_and_function_body
+ cp_parser_ctor_initializer_opt_and_function_body
(parser, /*in_function_try_block=*/true);
/* We're done with the `try' part. */
finish_function_try_block (try_block);
cp_parser_handler_seq (parser);
/* We're done with the handlers. */
finish_function_handler_sequence (try_block, compound_stmt);
-
- return ctor_initializer_p;
}
/* Parse a handler-seq.
bool inline_p)
{
tree fn;
- bool ctor_initializer_p = false;
bool saved_in_unbraced_linkage_specification_p;
bool saved_in_function_body;
unsigned saved_num_template_parameter_lists;
or function-transaction-block. Note that all of these include the
function-body. */
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRANSACTION_ATOMIC))
- ctor_initializer_p = cp_parser_function_transaction (parser,
- RID_TRANSACTION_ATOMIC);
+ cp_parser_function_transaction (parser, RID_TRANSACTION_ATOMIC);
else if (cp_lexer_next_token_is_keyword (parser->lexer,
RID_TRANSACTION_RELAXED))
- ctor_initializer_p = cp_parser_function_transaction (parser,
- RID_TRANSACTION_RELAXED);
+ cp_parser_function_transaction (parser, RID_TRANSACTION_RELAXED);
else if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRY))
- ctor_initializer_p = cp_parser_function_try_block (parser);
+ cp_parser_function_try_block (parser);
else
- ctor_initializer_p = cp_parser_ctor_initializer_opt_and_function_body
+ cp_parser_ctor_initializer_opt_and_function_body
(parser, /*in_function_try_block=*/false);
/* Finish the function. */
- fn = finish_function ((ctor_initializer_p ? 1 : 0) |
- (inline_p ? 2 : 0));
+ fn = finish_function (inline_p);
/* Generate code for it, if necessary. */
expand_or_defer_fn (fn);
/* Restore the saved values. */
{
parser->lexer->in_pragma = true;
cp_parser_omp_declare_reduction_exprs (member_function, parser);
- finish_function (/*inline*/2);
+ finish_function (/*inline_p=*/true);
cp_check_omp_declare_reduction (member_function);
}
else
if (!cp_parser_omp_declare_reduction_exprs (fndecl, parser))
{
if (!block_scope)
- finish_function (0);
+ finish_function (/*inline_p=*/false);
else
DECL_CONTEXT (fndecl) = current_function_decl;
if (cp)
if (cp)
cp_parser_pop_lexer (parser);
if (!block_scope)
- finish_function (0);
+ finish_function (/*inline_p=*/false);
else
{
DECL_CONTEXT (fndecl) = current_function_decl;
__transaction_relaxed function-try-block
*/
-static bool
+static void
cp_parser_function_transaction (cp_parser *parser, enum rid keyword)
{
unsigned char old_in = parser->in_transaction;
unsigned char new_in = 1;
tree compound_stmt, stmt, attrs;
- bool ctor_initializer_p;
cp_token *token;
gcc_assert (keyword == RID_TRANSACTION_ATOMIC
parser->in_transaction = new_in;
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRY))
- ctor_initializer_p = cp_parser_function_try_block (parser);
+ cp_parser_function_try_block (parser);
else
- ctor_initializer_p = cp_parser_ctor_initializer_opt_and_function_body
+ cp_parser_ctor_initializer_opt_and_function_body
(parser, /*in_function_try_block=*/false);
parser->in_transaction = old_in;
finish_transaction_stmt (stmt, compound_stmt, new_in, NULL_TREE);
-
- return ctor_initializer_p;
}
/* Parse a __transaction_cancel statement.