Skip to content

Add [[nodiscard]] attribute#8462

Open
llvm-beanz wants to merge 2 commits into
microsoft:mainfrom
llvm-beanz:nodiscard
Open

Add [[nodiscard]] attribute#8462
llvm-beanz wants to merge 2 commits into
microsoft:mainfrom
llvm-beanz:nodiscard

Conversation

@llvm-beanz
Copy link
Copy Markdown
Collaborator

This PR adds support for the [[nodiscard]] attribute so that diagnostics can be easily issued for cases where return types of functions should not be discarded.

This came up in feedback about the Matrix::Fill function in the linear algebra specification.

This PR adds support for the `[[nodiscard]]` attribute so that
diagnostics can be easily issued for cases where return types of
functions should not be discarded.

This came up in feedback about the `Matrix::Fill` function in the
linear algebra specification.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

✅ With the latest revision this PR passed the C/C++ code formatter.

../tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant