1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && %run %t >%t.out 2>&1
5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && %run %t >%t.out 2>&1
7 // TODO Success pending on resolution of
8 // https://github.com/google/sanitizers/issues/596
13 #include <sanitizer/msan_interface.h>
15 template <class T
> class Vector
{
32 NonTrivial
*nt
= new NonTrivial();
34 assert(__msan_test_shadow(nt
, sizeof(*nt
)) != -1);
36 Trivial
*t
= new Trivial();
38 assert(__msan_test_shadow(t
, sizeof(*t
)) != -1);