This is really a reference#5473
Conversation
This fixes a few cases that were missed when I updated `this` objects to be references. Specifically we were still generating some implicit `this` cases as pointers, and we were not always correctly looking through the reference types. Fixes microsoft#4709
../tools/clang/test/HLSLFileCheck/hlsl/classes/template_base_this.hlsl ../tools/clang/test/HLSLFileCheck/hlsl/classes/this_reference_2018.hlsl
pow2clk
left a comment
There was a problem hiding this comment.
Looks good though I'd still like the comments in the tests.
I'd like to have a discussion about the nonsensical LValueToRvalue casts. I've heard you mention it before and I'd like to understand why they exist and what to do about them.
| @@ -0,0 +1,48 @@ | |||
| // RUN: %dxc -T lib_6_4 -HV 2021 %s -ast-dump | FileCheck %s -check-prefix=AST | |||
| // RUN: %dxc -T lib_6_4 -HV 2021 %s -fcgl | FileCheck %s | |||
There was a problem hiding this comment.
I would appreciate a comment at the top of both of these tests explaining briefly what's being tested
Here's a simple example of the kinds of nonsense casts we get in the AST. Take this code: struct Doggo {
int4 Legs;
};
void Walk(inout Doggo D);
void fn() {
Doggo D = {1.xxxx};
Walk(D);
}When According to the AST, There are other cases where we do this wrong too. Fixing the ASTs to be accurate is the intent of #5249. |
This fixes a few cases that were missed when I updated `this` objects to be references. Specifically we were still generating some implicit `this` cases as pointers, and we were not always correctly looking through the reference types. Fixes microsoft#4709
This fixes a few cases that were missed when I updated
thisobjects to be references. Specifically we were still generating some implicitthiscases as pointers, and we were not always correctly looking through the reference types.Fixes #4709