This is an archive of the discontinued LLVM Phabricator instance.

[lbc++] Implement the rest of P0600R1 (nodiscard in the library)
ClosedPublic

Authored by philnik on Nov 7 2022, 4:02 PM.

Diff Detail

Event Timeline

philnik created this revision.Nov 7 2022, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 7 2022, 4:02 PM
philnik requested review of this revision.Nov 7 2022, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 7 2022, 4:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Nov 21 2022, 8:36 AM

LGTM w/ comments applied and CI passing.

libcxx/test/std/utilities/utility/mem.res/nodiscard.verify.cpp
1

Can you please make this // UNSUPPORTED: c++03, c++11, c++14, c++17 so that this is a conformance test without any extensions in it? Then, add another test in libcxx/test/libcxx/ .... that checks the extension in C++17 mode. This is nitpicky, but I would like to keep the test for the extension separate.

12

Please add the synopsis of the functions you're checking for nodiscardness.

This revision is now accepted and ready to land.Nov 21 2022, 8:36 AM
philnik updated this revision to Diff 477643.Nov 23 2022, 4:08 PM
philnik marked 2 inline comments as done.

Address comments

philnik updated this revision to Diff 477644.Nov 23 2022, 4:12 PM

Update tests

This revision was landed with ongoing or failed builds.Nov 29 2022, 10:42 AM
This revision was automatically updated to reflect the committed changes.