repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[AA] Rename CaptureInfo -> CaptureAnalysis (NFC) (#116842)
[llvm-project.git]
/
compiler-rt
/
test
/
msan
/
loop-scope.cpp
blob
638bdbe173241326a9052510cfc3a8c6d3c62e32
1
// RUN: %clangxx_msan -O2 %s -o %t && \
2
// RUN: not %run %t 2>&1 | FileCheck %s
3
4
#include <stdlib.h>
5
6
int
*
p
;
7
8
int
main
() {
9
for
(
int
i
=
0
;
i
<
3
;
i
++) {
10
int
x
;
11
if
(
i
==
0
)
12
x
=
0
;
13
p
= &
x
;
14
}
15
return
*
p
;
// BOOM
16
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
17
// CHECK: #0 0x{{.*}} in main {{.*}}loop-scope.cpp:[[@LINE-2]]
18
}