[libcxx-commits] [PATCH] D140855: [libc++] Add [[nodiscard]] extensions in <math.h>

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 2 13:08:37 PST 2023


philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

There are quite a few functions marked `[[gnu::const]]` inside the compiler. This patch adds `[[nodiscard]]` to libc++-provided overloads of these functions to match the diagnostics produced.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140855

Files:
  libcxx/include/math.h
  libcxx/include/stdlib.h
  libcxx/test/libcxx/diagnostics/math_nodiscard_extensions.verify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140855.485884.patch
Type: text/x-patch
Size: 36047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230102/3c331dcd/attachment-0001.bin>


More information about the libcxx-commits mailing list