summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-10 00:18:59 +0000
committerChris Lattner <sabre@nondot.org>2011-07-10 00:18:59 +0000
commit8806e32f162e3af2c22b600d7d4abdcca5bf7cfd (patch)
tree48630569e47697696ae4e86f7028b08adac8b346 /clang/test
parent7161661863c55bc383cb3803958d372ecf0a9980 (diff)
downloadbcm5719-llvm-8806e32f162e3af2c22b600d7d4abdcca5bf7cfd.tar.gz
bcm5719-llvm-8806e32f162e3af2c22b600d7d4abdcca5bf7cfd.zip
Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible since
it is a predicate, not an action. Change the return type to be a bool, not the incomplete member. Enhace it to detect the recursive compilation case, allowing us to compile Eli's testcase on llvmdev: struct T { struct T (*p)(void); } t; into: %struct.T = type { {}* } @t = common global %struct.T zeroinitializer, align 8 llvm-svn: 134853
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/init.c b/clang/test/CodeGen/init.c
index 0f94729a949..599b4f23dbd 100644
--- a/clang/test/CodeGen/init.c
+++ b/clang/test/CodeGen/init.c
@@ -115,3 +115,11 @@ void test11(struct test11S *P) {
// CHECK: store i32 4
// CHECK: ret void
}
+
+
+// Verify that we can convert a recursive struct with a memory that returns
+// an instance of the struct we're converting.
+struct test12 {
+ struct test12 (*p)(void);
+} test12g;
+
OpenPOWER on IntegriCloud