[libcxx-commits] [PATCH] D118938: [libc++] Implement P1007R3: std::assume_aligned

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 8 11:45:36 PDT 2022


ldionne marked an inline comment as done.
ldionne added a comment.
Herald added a project: All.

In D118938#3294779 <https://reviews.llvm.org/D118938#3294779>, @philnik wrote:

> Have the issues described in D54966 <https://reviews.llvm.org/D54966> been resolved? If yes, this LGTM.

I believe so, because we don't use `__builtin_assume_aligned` during constant evaluation anymore, and that was the main holdup IIUC.



================
Comment at: libcxx/test/std/utilities/memory/ptr.align/assume_aligned.nodiscard.verify.cpp:20
+void f() {
+  [[maybe_unused]] int *p = nullptr;
+  std::assume_aligned<4>(p); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
----------------
philnik wrote:
> Why is this `[[maybe_unused]]`?
Not sure, removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118938/new/

https://reviews.llvm.org/D118938



More information about the libcxx-commits mailing list