aaron.ballman added a comment. In D111199#3095623 <https://reviews.llvm.org/D111199#3095623>, @yonghong-song wrote:
>> Ah, yeah, I see what you mean - that does seem sort of unfortunate. Is it >> possible these attributes could only appear on typedefs and they'd be more >> readily carried through that without needing extra typeloc tracking? (sorry >> for not having read back through the rest of the review - which may've >> started there and ended up here as a more general form of the attribute?) > > For the question, "is it possible these attributes could only appear on > typedefs?" The answer is "not really possible". We are targeting existing > linux kernel where existing type attributes (__user, __rcu, ...) have been > used in places other than typedef quite extensively (e.g., function argument > type, function return type, field type, etc.). > > In one of my earlier prototypes, I put the tag string itself in > AttributedType and with this we can avoid TypeLoc, but I understand this is > not conventional usage and that is why we do through TypeLoc mechanism. > @aaron.ballman can further comment on this. FWIW, I made that request because AttributedTypeLoc stores the Attr * for the attributed type, so we can get the attribute argument information from that rather than having to duplicate it within a new TypeLoc object. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111199/new/ https://reviews.llvm.org/D111199 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits