Require complete types in some missing places#7511
Require complete types in some missing places#7511llvm-beanz merged 4 commits intomicrosoft:mainfrom
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
|
@tex3d's additions look good to me. I can't approve since I'm the original author. |
pow2clk
left a comment
There was a problem hiding this comment.
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
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 <texr@microsoft.com> (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 <cbieneman@microsoft.com>
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