Commit c561e952 by Jason Merrill Committed by Jason Merrill

name-lookup.c (pushdecl_maybe_friend_1): Use nonlambda_method_basetype and…

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
parent 477e1843
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,
......
// { dg-options "-std=c++11 -Wshadow" }
struct A
{
int i;
void f()
{
[=]{ int i; }; // { dg-warning "shadows" }
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment