summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-12 18:02:04 +0000
committerDan Gohman <gohman@apple.com>2010-07-12 18:02:04 +0000
commitc128e70ff2fdb5a72fa958c5c429a3f442a6decc (patch)
tree1ad9d2b9c3ce25cb32e5c7fb4f856814eade3ab6 /llvm/test/Other
parentMCAsmParser: Pull some directive handling out into a helper class, and change (diff)
downloadllvm-project-c128e70ff2fdb5a72fa958c5c429a3f442a6decc.tar.gz
llvm-project-c128e70ff2fdb5a72fa958c5c429a3f442a6decc.tar.bz2
llvm-project-c128e70ff2fdb5a72fa958c5c429a3f442a6decc.zip
Add a lint check for mismatched return types, inspired by PR6944.
llvm-svn: 108162
Diffstat (limited to 'llvm/test/Other')
-rw-r--r--llvm/test/Other/lint.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Other/lint.ll b/llvm/test/Other/lint.ll
index 9a10abf3c703..dee3d11d2fb5 100644
--- a/llvm/test/Other/lint.ll
+++ b/llvm/test/Other/lint.ll
@@ -154,3 +154,12 @@ exit:
%x = volatile load i32* %t3
br label %exit
}
+
+; CHECK: Call return type mismatches callee return type
+%struct = type { double, double }
+declare i32 @nonstruct_callee() nounwind
+define void @struct_caller() nounwind {
+entry:
+ call %struct bitcast (i32 ()* @foo to %struct ()*)()
+ ret void
+}