aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index a7b8eb8..da452c5 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -10322,8 +10322,8 @@ static tree
capture_decltype (tree decl)
{
tree lam = CLASSTYPE_LAMBDA_EXPR (DECL_CONTEXT (current_function_decl));
- tree cap = lookup_name_real (DECL_NAME (decl), LOOK_where::BLOCK_NAMESPACE,
- LOOK_want::NORMAL, LOOKUP_HIDDEN);
+ tree cap = lookup_name_real (DECL_NAME (decl), LOOK_where::BLOCK,
+ LOOK_want::NORMAL | LOOK_want::HIDDEN_LAMBDA);
tree type;
if (cap && is_capture_proxy (cap))