[cfe-dev] Clang: Erroneous behavior on windows

Daniel Berenyi u235axe at gmail.com
Mon Mar 23 06:52:55 PDT 2015


Yes, Sebastian's workaround compiles fine.
Indeed, the compatibility flags do not mitigate the problem.

Daniel

>> The issue appears to be that Clang gives the lambda's operator() a
__cdecl
>> calling convention instead of the default member __thiscall calling
>> convention.
>
>With MSVC compatibility turned on, we should be generating an
>operator() for every calling convention for non-capturing lambdas.>
>
>http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx
<http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx>
>http://blogs.msdn.com/b/oldnewthing/archive/2015/02/20/10594680.aspx
<http://blogs.msdn.com/b/oldnewthing/archive/2015/02/20/10594680.aspx>
>
>~Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150323/b3b19a6c/attachment.html>


More information about the cfe-dev mailing list