Skip to content

[llvm] Add LLVM_CTOR_NODISCARD #65418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

JDevlieghere
Copy link
Member

@JDevlieghere JDevlieghere commented Sep 5, 2023

[[nodiscard]] on constructors is a defect report against C++17. That means that it should be applied retroactively, though older compilers might not know about it and emit warnings. This adds a back-compatibility macro.

@github-actions github-actions bot added the mc Machine (object) code label Sep 5, 2023
[[nodiscard]] on constructors is a defect report against C++17. That
means that it should be applied retroactively, though older compilers
might not know about it and emit warnings. This adds a
back-compatibility macro.
Copy link
Contributor

@jroelofs jroelofs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JDevlieghere JDevlieghere merged commit 11ce3d9 into llvm:main Sep 5, 2023
@JDevlieghere JDevlieghere deleted the ctor-nodiscard branch September 5, 2023 23:47
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
[[nodiscard]] on constructors is a defect report against C++17. That
means that it should be applied retroactively, though older compilers
might not know about it and emit warnings. This adds a
back-compatibility macro.
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Sep 14, 2023
[[nodiscard]] on constructors is a defect report against C++17. That
means that it should be applied retroactively, though older compilers
might not know about it and emit warnings. This adds a
back-compatibility macro.

(cherry picked from commit 11ce3d9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants