[libcxx-commits] [libcxx] [libc++] Diagnoses insufficiently aligned pointers for std::assume_aligned during constant evaluation (PR #73775)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Dec 2 03:54:18 PST 2023


================
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+
+// #include <memory>
+
+// template<size_t N, class T>
+// [[nodiscard]] constexpr T* assume_aligned(T* ptr);
+
+// Diagnose insufficiently aligned pointers during constant evaluation.
+// ADDITIONAL_COMPILE_FLAGS: -Xclang -verify-ignore-unexpected=error -Xclang -verify-ignore-unexpected=warning
----------------
philnik777 wrote:

This shouldn't be required. Please remove this and list the generated errors.

https://github.com/llvm/llvm-project/pull/73775


More information about the libcxx-commits mailing list