<div dir="ltr"><span style="white-space:pre-wrap">clang -cc1 -cxx-abi microsoft -triple i686-pc-win32 as of now behaves as follows</span><br><div class="gmail_quote"><div dir="ltr"><pre style="width:50em;white-space:pre-wrap">

class A {
 public:
  static void foo();
};

void __cdecl A::foo() {}  // Error
void __thiscall A::foo() {}  // OK</pre><pre style="width:50em;white-space:pre-wrap">__thiscall is invalid for non-instance methods, though. And __cdecl is an implicit default.</pre>
<pre style="width:50em;white-space:pre-wrap">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.</pre>


<pre style="width:50em;white-space:pre-wrap">The patch also adds a test for implicit calling convention compatibility in declarations.</pre>
<pre style="width:50em;white-space:pre-wrap">Please review!</pre></div>
</div><br></div>