diff options
Diffstat (limited to 'clang/test/SemaCXX/unreachable-catch-clauses.cpp')
-rw-r--r-- | clang/test/SemaCXX/unreachable-catch-clauses.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/unreachable-catch-clauses.cpp b/clang/test/SemaCXX/unreachable-catch-clauses.cpp index 54187138d43..c75067f393e 100644 --- a/clang/test/SemaCXX/unreachable-catch-clauses.cpp +++ b/clang/test/SemaCXX/unreachable-catch-clauses.cpp @@ -8,6 +8,7 @@ void f(); void test() try {} -catch (BaseEx &e) { f(); } // expected-note {{for type 'BaseEx &'}} -catch (Ex1 &e) { f(); } // expected-warning {{exception of type 'Ex1 &' will be caught by earlier handler}} expected-note {{for type 'Ex1 &'}} -catch (Ex2 &e) { f(); } // expected-warning {{exception of type 'Ex2 &' (aka 'Ex1 &') will be caught by earlier handler}} +catch (BaseEx &e) { f(); } +catch (Ex1 &e) { f(); } // expected-note {{for type class Ex1 &}} +catch (Ex2 &e) { f(); } // expected-warning {{exception of type Ex2 & will be caught by earlier handler}} + |