name-lookup.c (pushdecl_maybe_friend_1): Use nonlambda_method_basetype and current_nonlambda_class_type.
* name-lookup.c (pushdecl_maybe_friend_1): Use nonlambda_method_basetype and current_nonlambda_class_type. From-SVN: r197210
This commit is contained in:
parent
477e1843fd
commit
c561e95201
3 changed files with 15 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2013-03-28 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* name-lookup.c (pushdecl_maybe_friend_1): Use
|
||||
nonlambda_method_basetype and current_nonlambda_class_type.
|
||||
|
||||
PR c++/56728
|
||||
* semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
|
||||
conversion from integer to pointer.
|
||||
|
|
|
@ -1163,8 +1163,8 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
|
|||
{
|
||||
tree member;
|
||||
|
||||
if (current_class_ptr)
|
||||
member = lookup_member (current_class_type,
|
||||
if (nonlambda_method_basetype ())
|
||||
member = lookup_member (current_nonlambda_class_type (),
|
||||
name,
|
||||
/*protect=*/0,
|
||||
/*want_type=*/false,
|
||||
|
|
10
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow2.C
Normal file
10
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow2.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-options "-std=c++11 -Wshadow" }
|
||||
|
||||
struct A
|
||||
{
|
||||
int i;
|
||||
void f()
|
||||
{
|
||||
[=]{ int i; }; // { dg-warning "shadows" }
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue