if self.cxx.hasCompileFlag('-faligned-allocation'):
self.config.available_features.add('-faligned-allocation')
+ else:
+ # FIXME remove this once more than just clang-4.0 support
+ # C++17 aligned allocation.
+ self.config.available_features.add('no-aligned-allocation')
if self.get_lit_bool('has_libatomic', False):
self.config.available_features.add('libatomic')
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// test operator new
-
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: no-aligned-allocation
+
+// test operator new
+
#include <new>
#include <cstddef>
#include <cassert>
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// test operator new (nothrow)
-
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: no-aligned-allocation
+
+// test operator new (nothrow)
+
#include <new>
#include <cstddef>
#include <cstdint>
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: sanitizer-new-delete
-// test operator new nothrow by replacing only operator new
+// XFAIL: no-aligned-allocation
-// UNSUPPORTED: sanitizer-new-delete
+// test operator new nothrow by replacing only operator new
#include <new>
#include <cstddef>
#include <cassert>
#include <limits>
-
constexpr auto OverAligned = alignof(std::max_align_t) * 2;
int A_constructed = 0;
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: sanitizer-new-delete
-// test operator new replacement
+// XFAIL: no-aligned-allocation
-// UNSUPPORTED: sanitizer-new-delete
+// test operator new replacement
#include <new>
#include <cstddef>
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// test operator new
-
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: no-aligned-allocation
+
+// test operator new
+
#include <new>
#include <cstddef>
#include <cassert>
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// test operator new (nothrow)
-
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: no-aligned-allocation
+
+// test operator new (nothrow)
+
#include <new>
#include <cstddef>
#include <cstdint>
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
-
-// test operator new nothrow by replacing only operator new
-
// UNSUPPORTED: sanitizer-new-delete
+// XFAIL: no-aligned-allocation
+
+// test operator new nothrow by replacing only operator new
#include <new>
#include <cstddef>
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: sanitizer-new-delete
-// test operator new replacement
+// XFAIL: no-aligned-allocation
-// UNSUPPORTED: sanitizer-new-delete
+// test operator new replacement
#include <new>
#include <cstddef>