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