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 | be02b20a8f9e9503733df945968e48562714dd32 (patch) | |
tree | fc3e737974bd84dc0f20007da4ae19f6f813a26d /test/Other | |
parent | b3cdb0ec31482b7fd730ccee92b19455f6f3022b (diff) | |
download | external_llvm-be02b20a8f9e9503733df945968e48562714dd32.zip external_llvm-be02b20a8f9e9503733df945968e48562714dd32.tar.gz external_llvm-be02b20a8f9e9503733df945968e48562714dd32.tar.bz2 |
Add several more lint checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r-- | test/Other/lint.ll | 21 |
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 } |