-
Notifications
You must be signed in to change notification settings - Fork 695
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
integral_constant is exposed to the global namespace in DXC (trunk) #6646
Comments
@cassiebeckley - we think that this is the result of something you added recently that should be in the |
Just updating this to say that this bug is now in 1.8.2405.17. It is no longer just an issue with DXC trunk on godbolt |
In the code that adds the builtin types, the pattern used for adding types in the vk namespace is
Note that the second condition is to check if the vk namespace has been defined. If not, it continues to the next condition, and eventually falls into the default case, which add the function in the default namespace: DirectXShaderCompiler/tools/clang/lib/Sema/SemaHLSL.cpp Lines 3851 to 3862 in 8c3f40c
We need to change this first condition, so that it continues if the vk namespace is not defined. |
Some of the types that have been added to the vk namespace were being added to the default namespace when compiling for DXIL. The if conditions were such that they would fall through to a default case. The solution is to explicitly add code that we should skip adding those builtin types when the vk namespace is not defined. Fixes microsoft#6646.
Some of the types that have been added to the vk namespace were being added to the default namespace when compiling for DXIL. The if conditions were such that they would fall through to a default case. The solution is to explicitly add code that we should skip adding those builtin types when the vk namespace is not defined. Fixes #6646.
Description
integral_constant
is defined in the global namespace in DXC(1.8.2405.17). The primary template appears to be declared as follows:I don't think this type should be defined in the global namespace.
Steps to Reproduce
This should not compile: https://godbolt.org/z/hKxdKhW7e.
DXC 1.8.2403 does not compile this code: https://godbolt.org/z/vha9GennT
Environment
The text was updated successfully, but these errors were encountered: