Skip to content

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 llvm: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
llvm:mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants