On Apr 8, 2013, at 3:06 PM, Alexander Zinenko <[email protected]> wrote:
> Sure, this code should belong to SemaDeclAttr. It required several not very 
> elegant changes to make it work correctly in some places.
> I also removed 'if'-ed dyn_cast to FieldDecl used just to get type since it 
> is inherited from ValueDecl and should be covered in the previous 'if'.

Mmm.  We generally handle this as a type attribute, not a decl attribute, so I 
think you probably need to handle it in SemaType.  This will let you handle 
things like variables declared as pointers to __thiscall functions.  It should 
just be a matter of looking at the immediate declarator context when applying 
the attribute (and inelegantly repeating some small amount of analysis about 
CurContext and 'static' and so forth).

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to