[PATCH] Make AnnotateAttr keeps pointer to StringLiteral instead of raw string.

Aaron Ballman aaron at aaronballman.com
Mon Aug 19 12:06:53 PDT 2013


On Mon, Aug 19, 2013 at 2:31 PM,  <jaroslaw.rosiek at interia.pl> wrote:
> I understand.
>
> What do you think then about adding additional getter in AnnotationAttr that will be named getAnnotation (same as before) and that will wrap the getAnnotationLiteral()->getString() call? No refactoring would be required in remaining parts of the code. The downside is that there will be dependency between AST/Attr.h and header with StringLiteral (currently fwd decl is sufficient).

You could probably do this as an AdditionalMembers (see Availability
as an attribute that does this), and you probably would not need to
touch AST/Attr.h for this (if anything, you may need to touch
AttrImpl.cpp).

That would greatly reduce the complexity of the change, I like it!

~Aaron




More information about the cfe-commits mailing list