[C++ Patch] Use DECL_SOURCE_LOCATION more in name-lookup.c

Marek Polacek polacek@redhat.com
Tue Sep 24 19:34:00 GMT 2019


On Tue, Sep 24, 2019 at 09:07:03PM +0200, Paolo Carlini wrote:
> Hi,
> 
> Marek's recent fix prompted an audit of name-lookup.c and I found a few
> additional straightforward places where we should use a more accurate
> location. Tested x86_64-linux.
> 
> Thanks, Paolo.
> 
> ///////////////////////
> 

> /cp
> 2019-09-24  Paolo Carlini  <paolo.carlini@oracle.com>
> 
> 	* name-lookup.c (check_extern_c_conflict): Use DECL_SOURCE_LOCATION.
> 	(check_local_shadow): Use it in three additional places.
> 
> /testsuite
> 2019-09-24  Paolo Carlini  <paolo.carlini@oracle.com>
> 
> 	* g++.dg/diagnostic/redeclaration-1.C: New.
> 	* g++.dg/lookup/extern-c-hidden.C: Test location(s) too.
> 	* g++.dg/lookup/extern-c-redecl.C: Likewise.
> 	* g++.dg/lookup/extern-c-redecl6.C: Likewise.
> 	* g++.old-deja/g++.other/using9.C: Likewise.

LGTM.

Marek



More information about the Gcc-patches mailing list