[PATCH] Emit diagnostic on illegal calling convention
Alexander Zinenko
ftynse at gmail.com
Mon Apr 15 11:01:05 PDT 2013
Hello John!
Finally moved this to SemaType and added more tests for pointers to
function appearing within other declarations.
Could you, please, look at this?
On 10 April 2013 22:40, John McCall <rjmccall at apple.com> wrote:
> On Apr 8, 2013, at 3:06 PM, Alexander Zinenko <ftynse at gmail.com> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130415/1a94ad31/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callconv.patch
Type: application/octet-stream
Size: 15855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130415/1a94ad31/attachment.obj>
More information about the cfe-commits
mailing list