
As captured in issue #108044, HLSL 202x is the target language mode for conformance for Clang. Earlier language modes will be a best effort and prioritized after 2020x. To make this easier and reduce our testing complexity we want to make 202x the default language mode now, and align all earlier modes to match 202x (except where we explicitly deviate). This change has the following concrete changes: * All older language modes gain `CPlusPlus11` as a base * The default language mode for HLSL sources is changed to 202x * A few test cases are updated to resolve differences in generated diagnostics. Second to last change for #108044
20 lines
546 B
HLSL
20 lines
546 B
HLSL
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - -fsyntax-only %s -verify
|
|
|
|
int& bark(int); // expected-error {{references are unsupported in HLSL}}
|
|
void meow(int&); // expected-error {{references are unsupported in HLSL}}
|
|
void chirp(int &&); // expected-error {{references are unsupported in HLSL}}
|
|
|
|
struct Foo {
|
|
int X;
|
|
int Y;
|
|
};
|
|
|
|
int entry() {
|
|
int X;
|
|
int &Y = X; // expected-error {{references are unsupported in HLSL}}
|
|
}
|
|
|
|
int roar(Foo &F) { // expected-error {{references are unsupported in HLSL}}
|
|
return F.X;
|
|
}
|