[cfe-dev] Attributes and redeclarations

Jordan Rose via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 20 15:00:30 PDT 2017


Hi, all. Michael Ilseman and I were working with the Clang AST (for Swift purposes) and wanted to check something about the behavior of attributes and redeclarations: are they supposed to be propagated forward, so that the most recent declaration has all of the attributes? Or copied back onto the canonical declaration? I have a vague memory that this is the case for function declarations, but the case we care about (today) is redeclarations of typedefs, and it doesn't seem to be occurring there.

typedef int WrappedInt;
typedef int WrappedInt __attribute__((swift_wrapper(struct)));
typedef int WrappedInt;

Thanks,
Jordan



More information about the cfe-dev mailing list