Commit c2b2bca6 by Jason Merrill

new

From-SVN: r33903
parent 40c954b9
// Test that we notice unfortunate handler ordering.
struct A { };
struct B: public A { };
struct C: private A { };
void f();
void g()
{
try { f(); }
catch (...) { } // ERROR - ... followed by others
catch (A*) { }
try { f(); }
catch (A*) { } // WARNING - A* before B*
catch (B*) { } // WARNING - A* before B*
try { f(); }
catch (A*) { }
catch (C*) { } // no warning; A is private base
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment