summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 19:52:08 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 19:52:08 +0000
commit34bbbb0670a7df57036c2e158857ef655548bca5 (patch)
treea40370cacb124a35a15e8df7766262292b7f292e /gcc/cp/cp-tree.h
parentefff306159648aee52fe35120a1ee0270034bda0 (diff)
downloadgcc-34bbbb0670a7df57036c2e158857ef655548bca5.tar.gz
2011-06-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 175225 using svnmerge. Using c_register_pragma_with_expansion_and_data is now possible... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@175227 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 06b5926faa8..904e44c77b1 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -268,7 +268,8 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
#define BIND_EXPR_BODY_BLOCK(NODE) \
TREE_LANG_FLAG_3 (BIND_EXPR_CHECK (NODE))
#define FUNCTION_NEEDS_BODY_BLOCK(NODE) \
- (DECL_CONSTRUCTOR_P (NODE) || DECL_DESTRUCTOR_P (NODE))
+ (DECL_CONSTRUCTOR_P (NODE) || DECL_DESTRUCTOR_P (NODE) \
+ || LAMBDA_FUNCTION_P (NODE))
#define STATEMENT_LIST_NO_SCOPE(NODE) \
TREE_LANG_FLAG_0 (STATEMENT_LIST_CHECK (NODE))
@@ -514,7 +515,8 @@ struct GTY (()) tree_default_arg {
(((struct tree_deferred_noexcept *)DEFERRED_NOEXCEPT_CHECK (NODE))->args)
#define DEFERRED_NOEXCEPT_SPEC_P(NODE) \
((NODE) && (TREE_PURPOSE (NODE)) \
- && TREE_CODE (TREE_PURPOSE (NODE)) == DEFERRED_NOEXCEPT)
+ && (TREE_CODE (TREE_PURPOSE (NODE)) == DEFERRED_NOEXCEPT \
+ || is_overloaded_fn (TREE_PURPOSE (NODE))))
struct GTY (()) tree_deferred_noexcept {
struct tree_base base;
@@ -624,7 +626,8 @@ enum cp_lambda_default_capture_mode_type {
#define LAMBDA_EXPR_CAPTURE_LIST(NODE) \
(((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->capture_list)
-/* The node in the capture-list that holds the 'this' capture. */
+/* During parsing of the lambda, the node in the capture-list that holds
+ the 'this' capture. */
#define LAMBDA_EXPR_THIS_CAPTURE(NODE) \
(((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->this_capture)
@@ -659,15 +662,21 @@ enum cp_lambda_default_capture_mode_type {
#define LAMBDA_EXPR_DISCRIMINATOR(NODE) \
(((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->discriminator)
+/* During parsing of the lambda, a vector of capture proxies which need
+ to be pushed once we're done processing a nested lambda. */
+#define LAMBDA_EXPR_PENDING_PROXIES(NODE) \
+ (((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->pending_proxies)
+
struct GTY (()) tree_lambda_expr
{
- struct tree_common common;
- location_t locus;
- enum cp_lambda_default_capture_mode_type default_capture_mode;
+ struct tree_typed typed;
tree capture_list;
tree this_capture;
tree return_type;
tree extra_scope;
+ VEC(tree,gc)* pending_proxies;
+ location_t locus;
+ enum cp_lambda_default_capture_mode_type default_capture_mode;
int discriminator;
};
@@ -1792,7 +1801,10 @@ struct GTY((variable_size)) lang_type {
this type can raise. Each TREE_VALUE is a _TYPE. The TREE_VALUE
will be NULL_TREE to indicate a throw specification of `()', or
no exceptions allowed. For a noexcept specification, TREE_VALUE
- is NULL_TREE and TREE_PURPOSE is the constant-expression. */
+ is NULL_TREE and TREE_PURPOSE is the constant-expression. For
+ a deferred noexcept-specification, TREE_PURPOSE is a DEFERRED_NOEXCEPT
+ (for templates) or an OVERLOAD list of functions (for implicitly
+ declared functions). */
#define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_LANG_SLOT_1 (NODE)
/* For FUNCTION_TYPE or METHOD_TYPE, return 1 iff it is declared `throw()'
@@ -5433,7 +5445,6 @@ extern bool cxx_omp_create_clause_info (tree, tree, bool, bool, bool);
extern tree baselink_for_fns (tree);
extern void finish_static_assert (tree, tree, location_t,
bool);
-extern tree describable_type (tree);
extern tree finish_decltype_type (tree, bool, tsubst_flags_t);
extern tree finish_trait_expr (enum cp_trait_kind, tree, tree);
extern tree build_lambda_expr (void);
@@ -5445,10 +5456,15 @@ extern tree lambda_function (tree);
extern void apply_lambda_return_type (tree, tree);
extern tree add_capture (tree, tree, tree, bool, bool);
extern tree add_default_capture (tree, tree, tree);
+extern tree build_capture_proxy (tree);
+extern void insert_pending_capture_proxies (void);
+extern bool is_capture_proxy (tree);
+extern bool is_normal_capture_proxy (tree);
extern void register_capture_members (tree);
extern tree lambda_expr_this_capture (tree);
extern tree nonlambda_method_basetype (void);
extern void maybe_add_lambda_conv_op (tree);
+extern bool is_lambda_ignored_entity (tree);
/* in tree.c */
extern int cp_tree_operand_length (const_tree);
@@ -5698,7 +5714,7 @@ extern tree build_x_arrow (tree);
extern tree build_m_component_ref (tree, tree);
extern tree build_functional_cast (tree, tree, tsubst_flags_t);
extern tree add_exception_specifier (tree, tree, int);
-extern tree merge_exception_specifiers (tree, tree);
+extern tree merge_exception_specifiers (tree, tree, tree);
/* in mangle.c */
extern void init_mangle (void);