Skip to content

Update nodiscard test#8471

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

Update nodiscard test#8471
llvm-beanz merged 2 commits into
microsoft:mainfrom
llvm-beanz:nodiscard-test

Conversation

@llvm-beanz
Copy link
Copy Markdown
Collaborator

This adds coverage of two uses missed in the original test. The first covers structs with nodiscard on the type declaration, the second covers selecting the method spelling of the attribute over the type attribute if both are present.

This adds coverage of two uses missed in the original test. The first
covers structs with nodiscard on the type declaration, the second covers
selecting the method spelling of the attribute over the type attribute
if both are present.
Comment thread tools/clang/test/SemaHLSL/attributes/nodiscard.hlsl
Copy link
Copy Markdown
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

Looks good, but would be nice to see a method of S without [[nodiscard]] or [[clang::warn_unused_result]] to demonstrate that no warning is generated, and this is by-design. (if that is indeed the intention)

@llvm-beanz llvm-beanz merged commit ac0a538 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-test branch May 21, 2026 23:56
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