<div>From test cases:</div><div><br></div><div><div>+int __stdcall f(void);</div><div>+</div><div>+/* This should compile without warning because __stdcall is treated</div><div>+as __cdecl in MS compatibility mode for x64 compiles*/</div>
<div>+int __cdecl f(void) {</div></div><div><br></div>Just one concern about this: if this is not blocking a lot of code from compiling, maybe we should treat this behaviour as an error (just like John suggested we do on mismatched inheritance attributes)?<div>
<br></div><div>Also this version of the patch does not do the right thing for rewriting tools and pretty printers, and since Clang is used a library for those purposes, I think we should solve that too.<br><div><br><div>
<div>
<br><div class="gmail_quote">On Fri, Sep 7, 2012 at 2:59 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Based on a conversation with Richard in IRC, this really does have to<br>
be modeled in Sema due to the way MSVC handles redeclarations. It<br>
truly does treat it as __cdecl even though it's not.<br>
<br>
The attached patch changes the calling convention while performing<br>
semantic analysis, and adds several test cases.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Joćo Matos<br>
</div></div></div></div>