diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-09 01:39:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-09 01:39:53 +0000 |
commit | 9ba08a463189f1b59a76bded4a7b2725c1c3fe4d (patch) | |
tree | cae28a154e8478cad17cc1ca0a844e418ed40238 /llvm/test/Other | |
parent | ee6451dca187e524799bfd574c31bdd5b05fe9b1 (diff) | |
download | bcm5719-llvm-9ba08a463189f1b59a76bded4a7b2725c1c3fe4d.tar.gz bcm5719-llvm-9ba08a463189f1b59a76bded4a7b2725c1c3fe4d.zip |
Add several more lint checks.
llvm-svn: 100841
Diffstat (limited to 'llvm/test/Other')
-rw-r--r-- | llvm/test/Other/lint.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Other/lint.ll b/llvm/test/Other/lint.ll index fb34c287b37..8658495c971 100644 --- a/llvm/test/Other/lint.ll +++ b/llvm/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 } |