[cfe-dev] RFC: unreachable catch-clauses due to superclass cathes
erikjv at me.com
Thu Jul 30 05:34:31 CDT 2009
After doing duplicate handlers for exceptions in C++, there is still a FIXME in Sema::ActOnCXXTryBlock which I am thinking of fixing:
// FIXME: We should detect handlers that cannot catch anything because an
// earlier handler catches a superclass. Need to find a method that is not
// quadratic for this.
I pondered a bit on this, and I cannot think of a non-quadratic algorithm. So, does anybody have ideas for this?
I am currently thinking of implementing a quadratic algorithm for it, and keep a TODO mentioning that the algorithm should be improved. That way, there at least is a check, albeit maybe not the most efficient one.
More information about the cfe-dev