Files
clang-p2996/compiler-rt/test/msan/noundef_analysis.cpp
hyeongyu kim be9eafc710 [msan] reflect the changed flag to the tests.
1b1c8d changed `enable-noundef-analysis` flag to
`disable-noundef-analysis`.  noundef_analysis.cpp was using old
`enable-noundef-analysis` flag and this patch fixes it.
2022-01-16 20:48:05 +09:00

25 lines
701 B
C++

// 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 -mllvm -msan-eager-checks=1 -o %t && not %run %t >%t.out 2>&1
// RUN: FileCheck %s < %t.out
// RUN: %clangxx_msan %s -disable-noundef-analysis -s -fsanitize-memory-param-retval -o %t && not %run %t >%t.out 2>&1
// RUN: FileCheck %s < %t.out
struct SimpleStruct {
int md1;
};
static int sink;
static void examineValue(int x) { sink = x; }
int main(int argc, char *argv[]) {
auto ss = new SimpleStruct;
examineValue(ss->md1);
return 0;
}
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
// MISSED-NOT: use-of-uninitialized-value