This patch implements the ability to distinguish between attributes explicitly written at the request of the user, and attributes implicitly generated to assist in bookkeeping by the compiler. It additionally removes the optional nature of the spelling list index when creating attributes. These two things go hand in hand because the spelling of the attribute is semantically important in some cases.
All attributes now receive a table-generated factory function named CreateImplicit. This function creates a new instance of the attribute, and flags it as being implicitly created. This attribute is then inserted into the AST as normal, but consumers of the AST are able to check whether the attribute was implicitly generated, if it suits them. Currently, no AST consumer cares (outside of the AST dumper, for testing purposes), but the expectation is that this will change. If the attribute has distinct spellings (where distinct is defined as "differing in more than just spelling varieties and leading/trailing underscores), it also receives a Spelling enumeration. This allows spelling-specific implicit attributes to be created without relying on fragile mechanisms. ~Aaron
Implicit.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
