Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
18c4fa8e
Commit
18c4fa8e
authored
Aug 19, 2015
by
Jason Merrill
Committed by
Jason Merrill
Aug 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lambda.c (current_nonlambda_scope): New.
From-SVN: r227022
parent
f02fe788
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
gcc/cp/ChangeLog
+4
-0
gcc/cp/cp-tree.h
+1
-0
gcc/cp/lambda.c
+24
-0
No files found.
gcc/cp/ChangeLog
View file @
18c4fa8e
2015-08-19 Jason Merrill <jason@redhat.com>
* lambda.c (current_nonlambda_scope): New.
2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
* call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
* call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
...
...
gcc/cp/cp-tree.h
View file @
18c4fa8e
...
@@ -6308,6 +6308,7 @@ extern tree lambda_expr_this_capture (tree, bool);
...
@@ -6308,6 +6308,7 @@ extern tree lambda_expr_this_capture (tree, bool);
extern
tree
maybe_resolve_dummy
(
tree
,
bool
);
extern
tree
maybe_resolve_dummy
(
tree
,
bool
);
extern
tree
current_nonlambda_function
(
void
);
extern
tree
current_nonlambda_function
(
void
);
extern
tree
nonlambda_method_basetype
(
void
);
extern
tree
nonlambda_method_basetype
(
void
);
extern
tree
current_nonlambda_scope
(
void
);
extern
void
maybe_add_lambda_conv_op
(
tree
);
extern
void
maybe_add_lambda_conv_op
(
tree
);
extern
bool
is_lambda_ignored_entity
(
tree
);
extern
bool
is_lambda_ignored_entity
(
tree
);
...
...
gcc/cp/lambda.c
View file @
18c4fa8e
...
@@ -817,6 +817,30 @@ nonlambda_method_basetype (void)
...
@@ -817,6 +817,30 @@ nonlambda_method_basetype (void)
return
TYPE_METHOD_BASETYPE
(
TREE_TYPE
(
fn
));
return
TYPE_METHOD_BASETYPE
(
TREE_TYPE
(
fn
));
}
}
/* Like current_scope, but looking through lambdas. */
tree
current_nonlambda_scope
(
void
)
{
tree
scope
=
current_scope
();
for
(;;)
{
if
(
TREE_CODE
(
scope
)
==
FUNCTION_DECL
&&
LAMBDA_FUNCTION_P
(
scope
))
{
scope
=
CP_TYPE_CONTEXT
(
DECL_CONTEXT
(
scope
));
continue
;
}
else
if
(
LAMBDA_TYPE_P
(
scope
))
{
scope
=
CP_TYPE_CONTEXT
(
scope
);
continue
;
}
break
;
}
return
scope
;
}
/* Helper function for maybe_add_lambda_conv_op; build a CALL_EXPR with
/* Helper function for maybe_add_lambda_conv_op; build a CALL_EXPR with
indicated FN and NARGS, but do not initialize the return type or any of the
indicated FN and NARGS, but do not initialize the return type or any of the
argument slots. */
argument slots. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment