Make test more lenient for custom clang version strings
[llvm-project.git] / compiler-rt / test / asan / TestCases / stack-frame-demangle.cpp
blob11a8b38e67242f2adbbf42b9435a5cb9277f152a
1 // RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
3 #include <string.h>
5 namespace XXX {
6 struct YYY {
7 static int ZZZ(int x) {
8 char array[10];
9 memset(array, 0, 10);
10 return array[x]; // BOOOM
11 // CHECK: ERROR: AddressSanitizer: stack-buffer-overflow
12 // CHECK: READ of size 1 at
13 // CHECK: is located in stack of thread T0 at offset
14 // CHECK: XXX::YYY::ZZZ
17 } // namespace XXX
19 int main(int argc, char **argv) {
20 int res = XXX::YYY::ZZZ(argc + 10);
21 return res;