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
Make test more lenient for custom clang version strings
[llvm-project.git]
/
compiler-rt
/
test
/
asan
/
TestCases
/
use-after-scope-loop.cpp
blob
3e199056930cbb262c3c8f1d5b233493c397887c
1
// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
2
3
int
*
p
[
3
];
4
5
int
main
() {
6
for
(
int
i
=
0
;
i
<
3
;
i
++) {
7
int
x
;
8
p
[
i
] = &
x
;
9
}
10
return
**
p
;
// BOOM
11
// CHECK: ERROR: AddressSanitizer: stack-use-after-scope
12
// CHECK: #0 0x{{.*}} in main {{.*}}.cpp:[[@LINE-2]]
13
}