r207997 - Fix pr19653.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue May 6 08:31:47 PDT 2014


> I think I'd like something like:
>
> warning: attribute 'section' on alias ignored; an alias is in the same
> section as its target
> note: target of alias is in section 'blah'
> ... or ...
> note: target of alias has no section specified
>
> (... with the note pointed at the target of the alias where possible.)

I started implementing this (attached), but getting the correct
location for the notes is hard. The problem is that the alias
attribute points to a mangled name. To find the location of the target
we have to map it map to a GlobalDecl. Not sure what is the correct
way to do that.

> I wonder whether we should warn regardless of whether the sections match,
> though: having both a section attribute and an alias attribute on the same
> declaration makes no sense, as far as I can tell.

I will let Nick provide the details, but it seems it is just a
convenience to simplify some ifdef heavy code.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 3260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140506/a6c58177/attachment.obj>


More information about the cfe-commits mailing list