[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space
Leonard Chan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 10 09:32:03 PDT 2018
leonardchan marked 7 inline comments as done.
leonardchan added a comment.
@rsmith So I chose to go with the type sugar route since we would prefer to have multiple attributes in one attribute list. This type just contains the underlying type and the macro identifier originally held by the `AttributedType`. Do you have any recommendations on where this type should be created?
Currently, I'm wrapping any `AttributedType` created under `processTypeAttrs` with this type since I still only hold the macro identifier in the `ParsedAttr`. The problem is that I keep incrementally running into failing assertions that I can slowly address, but all these assertions make me think I'm approaching this the wrong way. The failing assertions come from building or finding the type location if this type.
I'm thinking I could either make this type a subclass of `AttributedType` since we will essentially be using this only for attributes declared in a macro (I think this would allow me to not have to change some of the stuff that happens under `GetTypeSourceInfoForDeclarator`), or somehow find a way to make this in another part of `Sema`, although I would still need access to the parsed attributes so I would know what the macro identifiers are.
Repository:
rC Clang
https://reviews.llvm.org/D51329
More information about the cfe-commits
mailing list