Summarizing a conversation on IRC, I think we can keep this in for now and try to improve diagnostics other ways.
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. There's a few things we can do: 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. 2. Strengthen the test patterns to match only __attribute__((thiscall)) if you're worried about overmatching qualifiers 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. On Thu, Dec 12, 2013 at 9:02 AM, Rafael EspĂndola < [email protected]> wrote: > > Added: > > cfe/trunk/test/CodeGenCXX/mingw-new-abi.cpp > > Modified: > > cfe/trunk/docs/ReleaseNotes.rst > > cfe/trunk/lib/AST/ItaniumCXXABI.cpp > > cfe/trunk/test/CXX/class.access/p6.cpp > > cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp > > cfe/trunk/test/CXX/expr/expr.const/p3-0x.cpp > > cfe/trunk/test/CXX/expr/expr.mptr.oper/p5.cpp > > cfe/trunk/test/CXX/expr/expr.mptr.oper/p6-0x.cpp > > cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm > > cfe/trunk/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp > > cfe/trunk/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp > > > > > > These frontend tests really benefit from having precise matches: > > > > Consider a change like this: > > > > > > -int n = Val<bool, &S::operator int>::value; // expected-error > {{conversion > > from 'int (S::*)() const' to 'bool' is not allowed in a converted > constant > > expression}} > > +int n = Val<bool, &S::operator int>::value; // expected-error-re > > {{conversion from 'int (S::*)() {{.*}}const' to 'bool' is not allowed in > a > > converted constant expression}} > > > > > > Now there's no testing at all for the qualifiers. Not good. > > > > They've had stable output across several OS and hardware configurations > and > > major versions for years. > > > > So if an ABI point release switch on MinGW suddenly caused dozens of > stable > > tests to break, I'd say that's a problem with the patch, rather than a > case > > for editing all the tests. > > > > It's best to revert this until the pretty printer is fixed to display > > calling conventions only if they differ from the platform default. > > > > I am happy to revert the test changes and add a -triple instead for now. > > I will just let Reid comment on it since he suggested relaxing the tests. > > Cheers, > Rafael >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
