Skip to content

Add [[nodiscard]] attribute#8462

Merged
llvm-beanz merged 2 commits into
microsoft:mainfrom
llvm-beanz:nodiscard
May 21, 2026
Merged

Add [[nodiscard]] attribute#8462
llvm-beanz merged 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
@llvm-beanz llvm-beanz merged commit 8634ef1 into microsoft:main May 21, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap May 21, 2026
@llvm-beanz llvm-beanz deleted the nodiscard branch May 21, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants