1 // RUN: %clangxx_msan %s -o %t && %run %t >%t.out 2>&1
2 // RUN: FileCheck %s --check-prefix=MISSED --allow-empty < %t.out
3 // RUN: %clangxx_msan %s -mllvm -msan-eager-checks=1 -o %t && not %run %t >%t.out 2>&1
4 // RUN: FileCheck %s < %t.out
5 // RUN: %clangxx_msan %s -disable-noundef-analysis -s -fsanitize-memory-param-retval -o %t && not %run %t >%t.out 2>&1
6 // RUN: FileCheck %s < %t.out
7
8 struct SimpleStruct {
9 int md1;
10 };
11
12 static int sink;
13
examineValue(int x)14 static void examineValue(int x) { sink = x; }
15
main(int argc,char * argv[])16 int main(int argc, char *argv[]) {
17 auto ss = new SimpleStruct;
18 examineValue(ss->md1);
19
20 return 0;
21 }
22
23 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
24 // MISSED-NOT: use-of-uninitialized-value
25