Skip to content

Add missing diagnostic argument#7426

Merged
tcorringham merged 1 commit into
microsoft:mainfrom
tcorringham:issue-7425
Jun 20, 2025
Merged

Add missing diagnostic argument#7426
tcorringham merged 1 commit into
microsoft:mainfrom
tcorringham:issue-7425

Conversation

@tcorringham
Copy link
Copy Markdown
Collaborator

Two instances of the err_integer_literal_too_large diagnostic in HLSL specific code within Sema::ActOnNumericConstant() had a missing argument. When these diagnostics were raised this caused an assert in an assert enabled DXC, and random corruption of the diagnostic text in a non-assert enabled DXC.

The trivial fix is to supply the required argument.

Fixes #7425

Two instances of the err_integer_literal_too_large diagnostic in HLSL
specific code within Sema::ActOnNumericConstant() had a missing argument.
When these diagnostics were raised this caused an assert in an assert
enabled DXC, and random corruption of the diagnostic text in a non-assert
enabled DXC.

The trivial fix is to supply the required argument.

Fixes microsoft#7425
Copy link
Copy Markdown
Collaborator

@pow2clk pow2clk 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! For any future reviewers, even though this is in SemaExpr, it is HLSL-specific code. There are a few other places that this error is emitted for HLSL 202x that include the argument.

@tcorringham tcorringham merged commit b78ac50 into microsoft:main Jun 20, 2025
13 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Jun 20, 2025
@tcorringham tcorringham deleted the issue-7425 branch June 20, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Diagnostic has missing argument causing an assert

3 participants