1 // Test that function name is mangled in the "created by an allocation" line,
2 // and demangled in the single-frame "stack trace" that follows.
3 
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: FileCheck %s < %t.out && FileCheck %s < %t.out
6 
7 __attribute__((noinline))
f()8 int f() {
9   int x;
10   int *volatile p = &x;
11   return *p;
12 }
13 
main(int argc,char ** argv)14 int main(int argc, char **argv) {
15   return f();
16   // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
17   // CHECK: Uninitialized value was created by an allocation of 'x' in the stack frame of function '_Z1fv'
18   // CHECK: #0 {{.*}} in f{{.*}} {{.*}}report-demangling.cc:[[@LINE-10]]
19 }
20