diff --git a/compiler-rt/test/msan/noundef_analysis.cpp b/compiler-rt/test/msan/noundef_analysis.cpp --- a/compiler-rt/test/msan/noundef_analysis.cpp +++ b/compiler-rt/test/msan/noundef_analysis.cpp @@ -1,29 +1,22 @@ -// RUN: %clangxx_msan %s -fsanitize=memory -o %t && %run %t >%t.out 2>&1 -// RUN: FileCheck %s --check-prefix=UNDEFINED --allow-empty < %t.out -// RUN: %clangxx_msan %s -fsanitize=memory -Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1 -o %t && not %run %t >%t.out 2>&1 +// RUN: %clangxx_msan %s -o %t && %run %t >%t.out 2>&1 +// RUN: FileCheck %s --check-prefix=MISSED --allow-empty < %t.out +// RUN: %clangxx_msan %s -Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1 -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out -#include - -namespace { - struct SimpleStruct { int md1; }; -static volatile int sink; - -static void __attribute__((noinline)) examineValue(int x) { sink = x; } +static int sink; -} // namespace +static void examineValue(int x) { sink = x; } int main(int argc, char *argv[]) { auto ss = new SimpleStruct; - __msan_allocated_memory(ss, sizeof(SimpleStruct)); examineValue(ss->md1); return 0; } // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value -// UNDEFINED-NOT: use-of-uninitialized-value +// MISSED-NOT: use-of-uninitialized-value