]> granicus.if.org Git - clang/commitdiff
Add another test case for r101029, which verifies that we now
authorDouglas Gregor <dgregor@apple.com>
Mon, 12 Apr 2010 07:51:13 +0000 (07:51 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 12 Apr 2010 07:51:13 +0000 (07:51 +0000)
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

test/SemaObjCXX/parameters.mm [new file with mode: 0644]

diff --git a/test/SemaObjCXX/parameters.mm b/test/SemaObjCXX/parameters.mm
new file mode 100644 (file)
index 0000000..aab1fbd
--- /dev/null
@@ -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}}
+