<div dir="ltr">Summarizing a conversation on IRC, I think we can keep this in for now and try to improve diagnostics other ways.<div><br></div><div>MSVC *always* includes the calling convention in its diagnostics, so unless we have the smarts to know it's irrelevant, I think we should keep it for the time being.<div>
<div><br></div><div>There's a few things we can do:</div><div><br></div><div>1. Thread an ASTContext into TypePrinter, so it knows the default method CC.  Then it should suppress it, but probably *only* on member function pointer types, since it's implied.  Anywhere else it might be important.</div>
<div><br></div><div>2. Strengthen the test patterns to match only __attribute__((thiscall)) if you're worried about overmatching qualifiers</div><div><br></div><div>3. Print "void (__thiscall identifier)()" instead of "void identifier() __attribute__((thiscall))" to reduce the diagnostic length.  That keyword only works with -fms-extensions, though, which I believe is off for mingw by default.</div>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 9:02 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">> Added:<br>
>     cfe/trunk/test/CodeGenCXX/mingw-new-abi.cpp<br>
> Modified:<br>
>     cfe/trunk/docs/ReleaseNotes.rst<br>
>     cfe/trunk/lib/AST/ItaniumCXXABI.cpp<br>
>     cfe/trunk/test/CXX/class.access/p6.cpp<br>
>     cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp<br>
>     cfe/trunk/test/CXX/expr/expr.const/p3-0x.cpp<br>
>     cfe/trunk/test/CXX/expr/expr.mptr.oper/p5.cpp<br>
>     cfe/trunk/test/CXX/expr/expr.mptr.oper/p6-0x.cpp<br>
>     cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/<a href="http://blocks.mm" target="_blank">blocks.mm</a><br>
>     cfe/trunk/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp<br>
>     cfe/trunk/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp<br>
><br>
><br>
> These frontend tests really benefit from having precise matches:<br>
><br>
> Consider a change like this:<br>
><br>
><br>
> -int n = Val<bool, &S::operator int>::value; // expected-error {{conversion<br>
> from 'int (S::*)() const' to 'bool' is not allowed in a converted constant<br>
> expression}}<br>
> +int n = Val<bool, &S::operator int>::value; // expected-error-re<br>
> {{conversion from 'int (S::*)() {{.*}}const' to 'bool' is not allowed in a<br>
> converted constant expression}}<br>
><br>
><br>
> Now there's no testing at all for the qualifiers. Not good.<br>
><br>
> They've had stable output across several OS and hardware configurations and<br>
> major versions for years.<br>
><br>
> So if an ABI point release switch on MinGW suddenly caused dozens of stable<br>
> tests to break, I'd say that's a problem with the patch, rather than a case<br>
> for editing all the tests.<br>
><br>
> It's best to revert this until the pretty printer is fixed to display<br>
> calling conventions only if they differ from the platform default.<br>
><br>
<br>
</div></div>I am happy to revert the test changes and add a -triple instead for now.<br>
<br>
I will just let Reid comment on it since he suggested relaxing the tests.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>