-
Notifications
You must be signed in to change notification settings - Fork 796
Require complete types in some missing places #7511
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
Require complete types in some missing places #7511
Conversation
This change adds two additional calls to Sema::RequireCompleteType, one when evaluating unary `sizeof`, which fixes a reported issue with templates. The second is in the DXR diagnostics where complete type should be required but not diagnosed because ordering in the compiler is a bit wonky when diagnosing DXR entry points. Fixes microsoft#7510 ../tools/clang/test/SemaHLSL/raytracing-entry-diags.hlsl ../tools/clang/test/SemaHLSL/sizeof-requires-complete-type.hlsl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Chris!
@tex3d's additions look good to me. I can't approve since I'm the original author. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks sensible to me. The overall question I have is how do we determine where this is needed? Is it anywhere we check a type in Sema? Is there not somewhere we can insert this once and for all? I added a lot of these as part of the longvector diagnostics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Yeah, it's a bit more complicated than that. While it would seem convenient to call |
This change adds two additional calls to Sema::RequireCompleteType, one when evaluating unary `sizeof`, which fixes a reported issue with templates. The second is in the DXR diagnostics where complete type should be required but not diagnosed because ordering in the compiler is a bit wonky when diagnosing DXR entry points. Fixes microsoft#7510 --------- Co-authored-by: Tex Riddell <[email protected]> (cherry picked from commit 77dcbb6)
This change adds two additional calls to Sema::RequireCompleteType, one when evaluating unary `sizeof`, which fixes a reported issue with templates. The second is in the DXR diagnostics where complete type should be required but not diagnosed because ordering in the compiler is a bit wonky when diagnosing DXR entry points. Fixes #7510 --------- (cherry picked from commit 77dcbb6) Co-authored-by: Chris B <[email protected]>
This change adds additional calls to Sema::RequireCompleteType, one when evaluating unary
sizeof
, which fixes a reported issue with templates.The second area is in the DXR diagnostics where complete type should be required but not diagnosed because ordering in the compiler is a bit wonky when diagnosing DXR entry points.
The third is when checking the template argument for Load/Store, where again an incomplete type will be diagnosed later, but needs to be handled at this point.
Fixes #7510