[cfe-commits] r171267 - in /cfe/trunk: lib/Sema/Sema.cpp test/SemaCXX/warn-unused-filescoped.cpp

David Blaikie dblaikie at gmail.com
Mon Dec 31 10:24:41 PST 2012


On Mon, Dec 31, 2012 at 6:05 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> How did these elements even end up in the UnusedFileScopedDecls  ?
>> shouldn't we just ensure that they're not added there to begin with?
>
> The problem is corner cases like
>
>   typedef struct {
>     void bar();
>   } A;
>
> bar will have external linkage, but we only know that when we get to
> the 'A', by that time it is already in UnusedFileScopedDecls.

Right - perhaps we could delay adding it until that point. I remember
recently having to deal with this problem when addressing some linkage
& mangling issues due to similar constructs. r167906, though I'm not
sure if it'd provide any great insight into addressing this current
issue.




More information about the cfe-commits mailing list