Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Exception-specification diagnostics missing critical information #5160

Open Quuxplusone opened 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR7541
Status NEW
Importance P normal
Reported by Douglas Gregor (dgregor@apple.com)
Reported on 2010-07-01 09:36:47 -0700
Last modified on 2010-07-01 18:29:25 -0700
Version trunk
Hardware PC All
CC dgregor@apple.com, llvm-bugs@lists.llvm.org, sebastian.redl@getdesigned.at
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Several of the exception-specification diagnostics provide too little
information to be useful, particularly when we're checking for compatibility
between exception-specifications. For example:

t.cpp:11:39: error: target exception specification is not superset of source
  Y &(Y::*yptr1)(const Y&) throw(A) = &Y::operator=;

and

test/CXX/except/except.spec/p14.cpp:12:8: error: exception specification of
      overriding function is more lax than base version
struct X2 : public X0, public X1 { }; // expected-error 2{{exception ...
       ^
test/CXX/except/except.spec/p14.cpp:7:11: note: overridden virtual function is
      here
  virtual ~X0() throw(A); // expected-note{{overridden virtual function ...
          ^

should say what the actual exception specifications are or, perhaps, which
types are missing (in the "not a superset" diagnostic) or have been added (in
the "more lax" diagnostic).

As a secondary nit, we probably shouldn't use the term "lax". "Permissive",
perhaps?
Quuxplusone commented 14 years ago

Those diags are older than TypeSourceInfo, so at that time, there was no way to place them better. I suppose now would be a good time to change this. Re: lax vs permissive: I'll leave that one to the native speakers.