r247346 - [MS ABI] Make member pointers return true for isIncompleteType

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 13:25:45 PDT 2015


On Fri, Sep 11, 2015 at 1:16 PM, Richard Smith <richard at metafoo.co.uk>
wrote:

> On Fri, Sep 11, 2015 at 12:46 PM, David Majnemer via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Reduced it a bit:
>> template <class C, int (C::*M)(int)>
>> void JSMethod();
>> class A {
>>   int printd(int);
>>   void printd();
>> };
>> void A::printd() { JSMethod<A, &A::printd>(); }
>>
>> This test case will crash clang at the revision before this commit which
>> means that something more mysterious/horrific is going on...
>>
>
> Are we perhaps failing to RequireCompleteType on M's type after
> substituting the value of C into it?
>

Fixed in r247464.


>
> On Fri, Sep 11, 2015 at 11:10 AM, David Majnemer <david.majnemer at gmail.com
>> > wrote:
>>
>>> Taking a look, would appreciate it if we didn't revert this until I give
>>> it a fair shot.  Shouldn't take too long.
>>>
>>> On Fri, Sep 11, 2015 at 10:58 AM, Hans Wennborg <hans at chromium.org>
>>> wrote:
>>>
>>>> This made the Chromium build sad. For example:
>>>>
>>>> http://build.chromium.org/p/chromium.fyi/builders/ClangToTWin/builds/3092/steps/compile/logs/stdio
>>>>
>>>> Reduction:
>>>>
>>>> $ clang -cc1 -triple i686-pc-windows-msvc18.0.0 -w -fms-extensions
>>>> -fms-compatibility -fms-compatibility-version=18.0 -std=c++11
>>>> -fdelayed-template-parsing a.ii
>>>>
>>>> template <class C, int (C::*M)(int *, const int &, int &, int &)>
>>>> void JSMethod(char *, char *, int);
>>>> class A {
>>>>   int printd(int *, const int &, int &, int &);
>>>>   int printd_info;
>>>>   void printd() { JSMethod<A, &A::printd>("", "", printd_info); }
>>>> };
>>>>
>>>>
>>>> On Thu, Sep 10, 2015 at 2:52 PM, David Majnemer via cfe-commits
>>>> <cfe-commits at lists.llvm.org> wrote:
>>>> > Author: majnemer
>>>> > Date: Thu Sep 10 16:52:00 2015
>>>> > New Revision: 247346
>>>> >
>>>> > URL: http://llvm.org/viewvc/llvm-project?rev=247346&view=rev
>>>> > Log:
>>>> > [MS ABI] Make member pointers return true for isIncompleteType
>>>> >
>>>> > The type of a member pointer is incomplete if it has no inheritance
>>>> > model.  This lets us reuse more general logic already embedded in
>>>> clang.
>>>>
>>>
>>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150911/da7978ca/attachment.html>


More information about the cfe-commits mailing list