name-lookup.c (pushdecl_maybe_friend_1): Do check for shadowing of artificial locals.
authorJason Merrill <jason@redhat.com>
Fri, 17 Jun 2011 20:07:53 +0000 (16:07 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 17 Jun 2011 20:07:53 +0000 (16:07 -0400)
* name-lookup.c (pushdecl_maybe_friend_1): Do check for shadowing
of artificial locals.

From-SVN: r175157

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index baa4899743cfec86737fe696fdd667157d7faf03..f84bc45a38cc0281204ef849b475507e5ffc96bf 100644 (file)
@@ -1,5 +1,8 @@
 2011-06-17  Jason Merrill  <jason@redhat.com>
 
+       * name-lookup.c (pushdecl_maybe_friend_1): Do check for shadowing
+       of artificial locals.
+
        * parser.c (cp_parser_lambda_expression): Clear
        LAMBDA_EXPR_THIS_CAPTURE after parsing.
        * pt.c (tsubst_copy_and_build): Make sure it isn't set.
index 16b991d0d75fa340a89a638e4ef303d335ef4985..64a0f9ae4a0a990b856e24b1659b9845a043ab14 100644 (file)
@@ -1022,11 +1022,6 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
                        || (TREE_CODE (oldlocal) == TYPE_DECL
                            && (!DECL_ARTIFICIAL (oldlocal)
                                || TREE_CODE (x) == TYPE_DECL)))
-                  /* Don't check the `this' parameter or internally generated
-                      vars unless it's an implicit typedef (see
-                      create_implicit_typedef in decl.c).  */
-                  && (!DECL_ARTIFICIAL (oldlocal)
-                       || DECL_IMPLICIT_TYPEDEF_P (oldlocal))
                    /* Don't check for internally generated vars unless
                       it's an implicit typedef (see create_implicit_typedef
                       in decl.c).  */