-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[HLSL] Align language modes on 202x as default #108662
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
// HALF: #define __HLSL_ENABLE_16_BIT 1 | ||
// NOHALF-NOT: __HLSL_ENABLE_16_BIT | ||
|
||
// CHECK: #define __HLSL_VERSION 2021 | ||
// CHECK: #define __HLSL_VERSION 2028 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand where this 2028 is coming from. Is 202x intended to be 2028? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 202x doesn't have a year yet, so to make it big and far out I gave it 2028 and 202y has 2029... these will change before we actually ship. |
||
|
||
// CHECK: #define __SHADER_STAGE_AMPLIFICATION 14 | ||
// CHECK: #define __SHADER_STAGE_COMPUTE 5 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ _Static_assert(is_same<__decltype(4294967296), int64_t>::value, "4294967296 is i | |
// Clang emits a warning that it is interpreting it as unsigned because that is | ||
// not conforming to the C standard. | ||
|
||
// expected-warning@+1{{integer literal is too large to be represented in type 'long' and is subject to undefined behavior under C++98, interpreting as 'unsigned long'; this literal will be ill-formed in C++11 onwards}} | ||
// expected-warning@+1{{integer literal is too large to be represented in a signed integer type, interpreting as unsigned}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's all good now, but even though the filename suggests it's relevant to 202x, it wasn't targeting that before. Perhaps that contributed to the need for this change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test is verifying that Clang implements the 202x conforming literals feature. Clang doesn't implement the legacy behavior, so it is really the only behavior in Clang. |
||
static const uint64_t V = 9223372036854775808; | ||
|
||
_Static_assert(is_same<__decltype(0x0), int>::value, "0x0 is int"); | ||
|
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.
2028 == 202x and 2029 == 202y I expect?
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.
Yea. Subject to revision once we have an actual year.