blob: 78a9a9ef37c5560b5f189907755266bbf6f7cca4 [file] [log] [blame]
Eli Friedman319f4132013-06-21 01:28:03 +00001// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin11 -fsyntax-only -verify %s
2
3@interface NSException @end
4
5namespace test0 {
6 void test() {
7 try {
Davide Italiano32cbff72015-08-15 15:23:14 +00008 } catch (NSException e) { // expected-error {{cannot catch an Objective-C object by value}}
Eli Friedman319f4132013-06-21 01:28:03 +00009 }
10 }
11}