-
Notifications
You must be signed in to change notification settings - Fork 764
This is really a reference #5473
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
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
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
this
objects to be references. Specifically we were still generating some implicitthis
cases as pointers, and we were not always correctly looking through the reference types.Fixes #4709