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

[HLSL] __HLSL_ENABLE_16_BIT should define as 1 #89787

Closed
llvm-beanz opened this issue Apr 23, 2024 · 1 comment · Fixed by #89788
Closed

[HLSL] __HLSL_ENABLE_16_BIT should define as 1 #89787

llvm-beanz opened this issue Apr 23, 2024 · 1 comment · Fixed by #89788
Assignees
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" HLSL HLSL Language Support

Comments

@llvm-beanz
Copy link
Collaborator

While writing tests for #85714, I noticed a bug in our code in InitPreprocessor, and missing test coverage. We currently set __HLSL_ENABLE_16_BIT to the active HLSL language version value, we should instead set it to 1.

Acceptance Criteria

  • Updated preprocessor initialization and test verifying that the value is correctly set to 1 or not set as appropriate
@llvm-beanz llvm-beanz self-assigned this Apr 23, 2024
@llvm-beanz llvm-beanz converted this from a draft issue Apr 23, 2024
@llvm-beanz llvm-beanz added the HLSL HLSL Language Support label Apr 23, 2024
llvm-beanz added a commit to llvm-beanz/llvm-project that referenced this issue Apr 23, 2024
The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if
native 16-bit types are enabled and not set if they are not.

Previously we were setting the value to match the HLSL active language
version, and we had no test coverage verifing the value was set and not
set as expected.

Fixes llvm#89787
llvm-beanz added a commit that referenced this issue Apr 25, 2024
The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if
native 16-bit types are enabled and not set if they are not.

Previously we were setting the value to match the HLSL active language
version, and we had no test coverage verifing the value was set and not
set as expected.

Fixes #89787
@EugeneZelenko EugeneZelenko added the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Apr 25, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 25, 2024

@llvm/issue-subscribers-clang-frontend

Author: Chris B (llvm-beanz)

While writing tests for #85714, I noticed a bug in our code in InitPreprocessor, and missing test coverage. We currently set `__HLSL_ENABLE_16_BIT` to the active HLSL language version value, we should instead set it to `1`.

Acceptance Criteria

  • Updated preprocessor initialization and test verifying that the value is correctly set to 1 or not set as appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" HLSL HLSL Language Support
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants