aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-12 07:51:13 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-12 07:51:13 +0000
commit7683a3ffbbcb2950584bc85bb27ac921a3e5524e (patch)
treeb71476b3c29fda62547474f50f97f955f4dfb7ae /test
parentcb27b0f70d2017295776afafe3616e0bcd74ab51 (diff)
Add another test case for r101029, which verifies that we now
correctly diagnose instantiation of a function parameter with Objective-C class type (since Objective-C classes can't be passed by value). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/SemaObjCXX/parameters.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaObjCXX/parameters.mm b/test/SemaObjCXX/parameters.mm
new file mode 100644
index 0000000000..aab1fbda4d
--- /dev/null
+++ b/test/SemaObjCXX/parameters.mm
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -verify %s
+
+@interface A
+@end
+
+template<typename T>
+struct X0 {
+ void f(T); // expected-error{{interface type 'A' cannot be passed by value}}
+};
+
+X0<A> x0a; // expected-note{{instantiation}}
+