[cfe-dev] Attribute position in parsing class member function declarations

John Thompson john.thompson.jtsoftware at gmail.com
Wed Nov 25 15:13:48 PST 2009


Thanks.

>Any chance you're also interested in tackling the related PR here?

Sure.  I thought it was the same issue, but I guess it's a different code
path.  I'm working on it.

-John

On Wed, Nov 25, 2009 at 11:11 AM, Douglas Gregor <dgregor at apple.com> wrote:

>
>  On Nov 24, 2009, at 7:42 AM, John Thompson wrote:
>
>  Here's an updated version of my attempt to fix a problem with attributes
> coming after a declaration, but before other stuff, plus the beginnings of
> C++ test for it.  Sorry, I don't know attributes well, so I didn't try to
> make it more exhaustive.
>
> Could someone check this out for me, or do a more correct fix?
>
>
> The patch looks fine, thanks! Any chance you're also interested in tackling
> the related PR here?
>
> http://llvm.org/bugs/show_bug.cgi?id=5605
>
> - Doug the Insatiable
>
>  Thanks.
>
> -John
> On Thu, Nov 19, 2009 at 8:23 PM, John Thompson <
> john.thompson.jtsoftware at gmail.com> wrote:
>
>> Oh, I'm sorry, I forgot to hit save after editing the patch.  Here it is
>> again with just the relevant changes.  I also beefed up the C test a little,
>> but it just occured to me that there probably should be an additional test
>> file in C++, nonetheless here's a start.
>>
>>
>> On Thu, Nov 19, 2009 at 8:04 PM, Sean Hunt <rideau3 at gmail.com> wrote:
>>
>>>  John Thompson wrote:
>>>
>>>> I have a couple of cases where I'm getting an error from Clang from code
>>>> that compiles with gcc.
>>>>  The code reduces to something like (members in a class declaration):
>>>>  virtual void Log(const char*, ...) __attribute__ ((
>>>> __format__(__printf__,1,2) )) = 0;
>>>> virtual void PushContextMessage(const char* , ...) __attribute__ ((
>>>> __format__(__printf__,1,2) )) {};
>>>> Both get "expected ';' at end of declaration list" errors.
>>>>  The enclosed patch takes a stab at fixing it with some copy/paste
>>>> programming, assuming it needs fixing, but you might have a better fix or
>>>> feedback.
>>>>  -John
>>>>
>>>
>>> There's a lot of code in that patch that isn't directly related to the
>>> problem - could you please post a patch of just the specific changes you
>>> would make to address this issue?
>>>
>>> Sean
>>>
>>
>>
>>
>>  --
>> John Thompson
>> John.Thompson.JTSoftware at gmail.com
>>
>>
>
>
> --
> John Thompson
> John.Thompson.JTSoftware at gmail.com
>
> <attr_pos1.patch><cxx-attributes.cpp>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091125/69b1b619/attachment.html>


More information about the cfe-dev mailing list