Skip to content
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

Core: Mark relevant Interpreter/JIT functions as [[nodiscard]] #1339

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

lioncash
Copy link
Contributor

@lioncash lioncash commented Nov 2, 2021

Lets the compiler warn loudly when the result from any of these functions are left unused (indicating a bug).

This is primarily useful for the GetSrc/GetDst-related functions when making new IR op implementations, but the other cases are relatively useful for catching silent bugs introduced during refactors.

Lets the compiler warn loudly when the result from any of these
functions are left unused (indicating a bug).
Copy link
Member

@Sonicadvance1 Sonicadvance1 left a comment

Choose a reason for hiding this comment

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

Always nice to have the compiler yell at us more.

@Sonicadvance1 Sonicadvance1 merged commit 43454ab into FEX-Emu:main Nov 3, 2021
@lioncash lioncash deleted the nodiscard branch November 3, 2021 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants