public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] c++: Remove redundant code.
@ 2020-08-22 21:06 Giuliano Belinassi
0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 21:06 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:83da5eae73e5ea05f5abf1e9760ae8b0daafa023
commit 83da5eae73e5ea05f5abf1e9760ae8b0daafa023
Author: Jason Merrill <jason@redhat.com>
Date: Mon May 11 14:05:46 2020 -0400
c++: Remove redundant code.
We walk the lambda captures in cp_walk_subtrees, so we don't also need to
walk them here.
gcc/cp/ChangeLog
2020-05-11 Jason Merrill <jason@redhat.com>
* pt.c (find_parameter_packs_r) [LAMBDA_EXPR]: Remove redundant
walking of capture list.
Diff:
---
gcc/cp/ChangeLog | 5 +++++
gcc/cp/pt.c | 6 ------
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f92c6416ee6..adbe287c5dc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-11 Jason Merrill <jason@redhat.com>
+
+ * pt.c (find_parameter_packs_r) [LAMBDA_EXPR]: Remove redundant
+ walking of capture list.
+
2020-05-11 Jason Merrill <jason@redhat.com>
* cp-tree.h (LOOKUP_EXPLICIT_TMPL_ARGS): Remove.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c6091127225..112426af72a 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3988,18 +3988,12 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
case LAMBDA_EXPR:
{
- /* Look at explicit captures. */
- for (tree cap = LAMBDA_EXPR_CAPTURE_LIST (t);
- cap; cap = TREE_CHAIN (cap))
- cp_walk_tree (&TREE_VALUE (cap), &find_parameter_packs_r, ppd,
- ppd->visited);
/* Since we defer implicit capture, look in the parms and body. */
tree fn = lambda_function (t);
cp_walk_tree (&TREE_TYPE (fn), &find_parameter_packs_r, ppd,
ppd->visited);
cp_walk_tree (&DECL_SAVED_TREE (fn), &find_parameter_packs_r, ppd,
ppd->visited);
- *walk_subtrees = 0;
return NULL_TREE;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-22 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 21:06 [gcc/devel/autopar_devel] c++: Remove redundant code Giuliano Belinassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).