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
|
@ -1,5 +1,8 @@
|
||||||
2013-03-28 Jason Merrill <jason@redhat.com>
|
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
|
PR c++/56728
|
||||||
* semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
|
* semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
|
||||||
conversion from integer to pointer.
|
conversion from integer to pointer.
|
||||||
|
|
|
@ -1163,8 +1163,8 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
|
||||||
{
|
{
|
||||||
tree member;
|
tree member;
|
||||||
|
|
||||||
if (current_class_ptr)
|
if (nonlambda_method_basetype ())
|
||||||
member = lookup_member (current_class_type,
|
member = lookup_member (current_nonlambda_class_type (),
|
||||||
name,
|
name,
|
||||||
/*protect=*/0,
|
/*protect=*/0,
|
||||||
/*want_type=*/false,
|
/*want_type=*/false,
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
// { dg-options "-std=c++11 -Wshadow" }
|
||||||
|
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
void f()
|
||||||
|
{
|
||||||
|
[=]{ int i; }; // { dg-warning "shadows" }
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue