erichkeane wrote:

> > Yeah, I think I can live with this. I think not supporting the arbitrary 
> > order is more annoying to users than a slight degradation in source 
> > location reporting.
> 
> The point @kadircet brings up about tooling is a good one, though. I'm not 
> certain we need to revert the patch, but breaking a bunch of tools and making 
> them cope with the source location change is pretty disruptive. I think we 
> may need to consider refactoring source location handling for attributes more 
> broadly to solve the underlying concerns. Thoughts @erichkeane?
> 
> Related, this issue just was filed today: #140020

I wouldn't be opposed to SOME sort of improvement in attributes handling.  We 
flatten the list of attributes unfortunately, so we couldn't add source 
location to each group in any way....

My one immediate thought is: What if we added ONE extra source-location to 
`AttrCommonInfo`?  The FIRST in each group gets the 'begin' location, and the 
'LAST' in each group gets the 'end' location.  Everyone else gets an empty 
source location. We could make it private, then just accessible via functions 
from Decl.  Since we maintain order of attributes, we'd get them reasonably 
well.

WDYT?

I don't really have the time/ability to do so, but am definitely willing to 
review something like this.

https://github.com/llvm/llvm-project/pull/133107
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to