summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/unknown-anytype.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-11 07:02:50 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-11 07:02:50 +0000
commit379b5155b4566f63679e1da6b0ceb5fdfa2aec6d (patch)
tree7356aaebdf826a1e4280ca48be61de2f6c1aa082 /test/CodeGenCXX/unknown-anytype.cpp
parent575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 (diff)
More __unknown_anytype work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/unknown-anytype.cpp')
-rw-r--r--test/CodeGenCXX/unknown-anytype.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/unknown-anytype.cpp b/test/CodeGenCXX/unknown-anytype.cpp
index fdf5fab9cf..06b6490168 100644
--- a/test/CodeGenCXX/unknown-anytype.cpp
+++ b/test/CodeGenCXX/unknown-anytype.cpp
@@ -55,3 +55,22 @@ Test7 test7() {
// CHECK: call void @test7_any({{%.*}}* sret {{%.*}}, i32 5)
return (Test7) test7_any(5);
}
+
+struct Test8 {
+ __unknown_anytype foo();
+ __unknown_anytype foo(int);
+
+ void test();
+};
+void Test8::test() {
+ (int) foo();
+ (int) foo(5);
+ (float) this->foo();
+ (float) this->foo(5);
+}
+void test8(Test8 *p) {
+ (double) p->foo();
+ (double) p->foo(5);
+ (bool) (*p).foo();
+ (bool) (*p).foo(5);
+}