aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Other/lint.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Other/lint.ll b/test/Other/lint.ll
index fb34c28..8658495 100644
--- a/test/Other/lint.ll
+++ b/test/Other/lint.ll
@@ -35,6 +35,10 @@ define i32 @foo() noreturn {
%q = ashr i32 0, 32
; CHECK: Shift count out of range
%l = shl i32 0, 32
+; CHECK: xor(undef, undef)
+ %xx = xor i32 undef, undef
+; CHECK: sub(undef, undef)
+ %xs = sub i32 undef, undef
br label %next
next:
@@ -42,4 +46,21 @@ next:
%a = alloca i32
; CHECK: Return statement in function with noreturn attribute
ret i32 0
+
+foo:
+ %z = add i32 0, 0
+; CHECK: unreachable immediately preceded by instruction without side effects
+ unreachable
+}
+
+; CHECK: Unnamed function with non-local linkage
+define void @0() nounwind {
+ ret void
+}
+
+; CHECK: va_start called in a non-varargs function
+declare void @llvm.va_start(i8*)
+define void @not_vararg(i8* %p) nounwind {
+ call void @llvm.va_start(i8* %p)
+ ret void
}