aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/instantiate-stmt.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/instantiate-stmt.mm')
-rw-r--r--test/SemaObjCXX/instantiate-stmt.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjCXX/instantiate-stmt.mm b/test/SemaObjCXX/instantiate-stmt.mm
new file mode 100644
index 0000000000..4c477aaf6c
--- /dev/null
+++ b/test/SemaObjCXX/instantiate-stmt.mm
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+@interface NSException
+@end
+
+// @throw
+template<typename T>
+void throw_test(T value) {
+ @throw value; // expected-error{{@throw requires an Objective-C object type ('int' invalid)}}
+}
+
+template void throw_test(NSException *);
+template void throw_test(int); // expected-note{{in instantiation of}}
+
+