erichkeane wrote:

> > @AaronBallman : curious of your thoughts.
> 
> I think we could either go with a one-off fix that's specific to `asm` (which 
> closes the linked issue), or we could explore the more general solution of 
> how to handle attributes with custom parsing logic. My gut feeling is that 
> the general solution will be tricky to solve though; printing logic isn't 
> trivial because you've got things like `constinit`, `asm`, calling 
> conventions like `__cdecl`, oddities like `_Noreturn`, etc.

I find myself wondering if instead of just 'addAttr' doing a 'push_back' there 
should be some sort of 'insert sorted' instead?  It would avoid the partition 
problem above (and it is only a couple of checks?).  Not sure if it is worth 
the perf hit though vs just modifying the printing.  

https://github.com/llvm/llvm-project/pull/162556
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to