[PATCH] fix MergeFunctionDecl implicit CC for static methods

Alexander Zinenko ftynse at gmail.com
Thu Feb 21 02:23:39 PST 2013


Thanks for it, building Chromium on my available Windows host takes much
time.

FYI, this patch is not supposed to fix PR13457, only the issue with static
method definition.



On 21 February 2013 11:46, Timur Iskhodzhanov <timurrrr at google.com> wrote:

> I'd like to test it on the Chromium codebase tomorrow first if you don't
> mind
> 21.02.2013 13:30 пользователь "Alexander Zinenko" <ftynse at gmail.com>
> написал:
>
> Could you, please, commit it?
>>
>>
>> On 21 February 2013 01:33, Rafael Espíndola <rafael.espindola at gmail.com>wrote:
>>
>>> LGTM, Thanks!
>>>
>>> On 20 February 2013 12:43, Alexander Zinenko <ftynse at gmail.com> wrote:
>>> > clang -cc1 -cxx-abi microsoft -triple i686-pc-win32 as of now behaves
>>> as
>>> > follows
>>> >
>>> > class A {
>>> >  public:
>>> >   static void foo();
>>> > };
>>> >
>>> > void __cdecl A::foo() {}  // Error
>>> > void __thiscall A::foo() {}  // OK
>>> >
>>> > __thiscall is invalid for non-instance methods, though. And __cdecl is
>>> an
>>> > implicit default.
>>> >
>>> > The problem is in MergeFunctionDecl: New function decl doesn't have
>>> > information about static storage duration yet, only the Old one,
>>> therefore
>>> > wrong default CC is checked.
>>> >
>>> > The patch also adds a test for implicit calling convention
>>> compatibility in
>>> > declarations.
>>> >
>>> > Please review!
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > cfe-commits mailing list
>>> > cfe-commits at cs.uiuc.edu
>>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>> >
>>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130221/8b37762f/attachment.html>


More information about the cfe-commits mailing list