[all-commits] [llvm/llvm-project] 3c355e: [libc++] Enable [[nodiscard]] extensions by default

philnik777 via All-commits all-commits at lists.llvm.org
Fri Sep 2 12:34:38 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c355e2881887fea6f4b31e26b68aefa4d216fd0
      https://github.com/llvm/llvm-project/commit/3c355e2881887fea6f4b31e26b68aefa4d216fd0
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2022-09-02 (Fri, 02 Sep 2022)

  Changed paths:
    M libcxx/docs/ReleaseNotes.rst
    M libcxx/docs/UsingLibcxx.rst
    M libcxx/include/__config
    M libcxx/test/libcxx/algorithms/callable.verify.cpp
    R libcxx/test/libcxx/diagnostics/enable_nodiscard_ext.verify.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
    M libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
    M libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
    M libcxx/test/std/containers/container.node/node_handle.nodiscard.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp
    M libcxx/test/std/utilities/memory/ptr.align/assume_aligned.nodiscard.verify.cpp

  Log Message:
  -----------
  [libc++] Enable [[nodiscard]] extensions by default

Adding `[[nodiscard]]` to functions is a conforming extension and done extensively in the MSVC STL.

Reviewed By: ldionne, EricWF, #libc

Spies: #libc_vendors, cjdb, mgrang, jloser, libcxx-commits

Differential Revision: https://reviews.llvm.org/D128267




More information about the All-commits mailing list