diff options
author | Jason Merrill <jason@redhat.com> | 2021-11-13 17:16:46 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-11-15 02:50:26 -0500 |
commit | daa9c6b015a33fa98af0ee7cd6919120248ab5f9 (patch) | |
tree | ff24bf6d4772cddc497f14db9f6d2001939b3b75 /gcc/cp/semantics.c | |
parent | bd95d75f3412e1a7debab7c6c602ba409f274eb5 (diff) | |
download | gcc-daa9c6b015a33fa98af0ee7cd6919120248ab5f9.zip gcc-daa9c6b015a33fa98af0ee7cd6919120248ab5f9.tar.gz gcc-daa9c6b015a33fa98af0ee7cd6919120248ab5f9.tar.bz2 |
c++: is_this_parameter and coroutines proxies
Compiling coroutines/pr95736.C with the implicit constexpr patch broke
because is_this_parameter didn't recognize the coroutines proxy for 'this'.
gcc/cp/ChangeLog:
* semantics.c (is_this_parameter): Check DECL_HAS_VALUE_EXPR_P
instead of is_capture_proxy.
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 60e0982..1540442 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -11382,7 +11382,8 @@ is_this_parameter (tree t) { if (!DECL_P (t) || DECL_NAME (t) != this_identifier) return false; - gcc_assert (TREE_CODE (t) == PARM_DECL || is_capture_proxy (t) + gcc_assert (TREE_CODE (t) == PARM_DECL + || (TREE_CODE (t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (t)) || (cp_binding_oracle && TREE_CODE (t) == VAR_DECL)); return true; } |