summaryrefslogtreecommitdiffstats
path: root/llvm/test/Other
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-09-30 07:30:10 +0000
committerDuncan Sands <baldrick@free.fr>2012-09-30 07:30:10 +0000
commit5e561bbd5dcedf5338e939ef8ead1eadd797240c (patch)
tree44e4923aa6a1230925d50baf15f5ebf9daf14e06 /llvm/test/Other
parentabbe66515447824b427e7c340ef8253ecac4061c (diff)
downloadbcm5719-llvm-5e561bbd5dcedf5338e939ef8ead1eadd797240c.tar.gz
bcm5719-llvm-5e561bbd5dcedf5338e939ef8ead1eadd797240c.zip
Ignore apparent buffer overruns on external or weak globals. This is a major
source of false positives due to globals being declared in a header with some kind of incomplete (small) type, but the actual definition being bigger. llvm-svn: 164912
Diffstat (limited to 'llvm/test/Other')
-rw-r--r--llvm/test/Other/lint.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Other/lint.ll b/llvm/test/Other/lint.ll
index d3ab98872d7..78bbbe9e6fa 100644
--- a/llvm/test/Other/lint.ll
+++ b/llvm/test/Other/lint.ll
@@ -9,6 +9,7 @@ declare void @has_noaliases(i32* noalias %p, i32* %q)
declare void @one_arg(i32)
@CG = constant i32 7
+@E = external global i8
define i32 @foo() noreturn {
%buf = alloca i8
@@ -100,6 +101,10 @@ next:
ret i32 0
foo:
+; CHECK-NOT: Undefined behavior: Buffer overflow
+; CHECK-NOT: Memory reference address is misaligned
+ %e = bitcast i8* @E to i64*
+ store i64 0, i64* %e
%z = add i32 0, 0
; CHECK: unreachable immediately preceded by instruction without side effects
unreachable
OpenPOWER on IntegriCloud