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-if.cpp
blob
4c6cf34eaa9fd31afa3d779751b7b2f8f4df5abc
1
// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
2
3
int
*
p
;
4
bool
b
=
true
;
5
6
int
main
() {
7
if
(
b
) {
8
int
x
[
5
];
9
p
=
x
+
1
;
10
}
11
return
*
p
;
// BOOM
12
// CHECK: ERROR: AddressSanitizer: stack-use-after-scope
13
// CHECK: #0 0x{{.*}} in main {{.*}}.cpp:[[@LINE-2]]
14
}