> 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
t.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
