Skip to content

Commit 2c128ef

Browse files
committed
Remove redundant '' around %0 in unsupported_object_context diag msg
1 parent 57ff5a3 commit 2c128ef

8 files changed

Lines changed: 118 additions & 118 deletions

File tree

tools/clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7886,7 +7886,7 @@ def err_hlsl_unsupported_long_vector
78867886
"payload parameters|attributes}0 are not supported">;
78877887
// %select options must be compatible with err_hlsl_unsupported_long_vector (same index used)
78887888
def err_hlsl_unsupported_object_context
7889-
: Error<"object '%0' is not allowed in "
7889+
: Error<"object %0 is not allowed in "
78907890
"%select{ConstantBuffers or TextureBuffers|"
78917891
"tessellation patches|geometry streams|node records|"
78927892
"cbuffers or tbuffers|user-defined struct parameter|"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %dxc -T lib_6_9 %s -verify
22

3-
// expected-error@+1{{object ''dx::HitObject'' is not allowed in structured buffers}}
3+
// expected-error@+1{{object 'dx::HitObject' is not allowed in structured buffers}}
44
RWStructuredBuffer<dx::HitObject> InvalidBuffer;

tools/clang/test/SemaHLSL/hlsl/objects/HitObject/hitobject_traceinvoke_payload_udt.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct Attribs
1616
[shader("raygeneration")]
1717
void RayGen()
1818
{
19-
// expected-error@+2{{object ''dx::HitObject'' is not allowed in payload parameters}}
19+
// expected-error@+2{{object 'dx::HitObject' is not allowed in payload parameters}}
2020
// expected-note@8{{'dx::HitObject' field declared here}}
2121
Payload payload_in_rg;
2222
dx::HitObject::Invoke( dx::HitObject(), payload_in_rg );

tools/clang/test/SemaHLSL/hlsl/types/invalid-hitobject-decls-hs.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ struct LongVec {
1212

1313
HsConstantData
1414
PatchConstantFunction(
15-
// expected-error@-1{{object ''dx::HitObject'' is not allowed in patch constant function return type}}
15+
// expected-error@-1{{object 'dx::HitObject' is not allowed in patch constant function return type}}
1616
// expected-note@5{{'dx::HitObject' field declared here}}
1717
dx::HitObject hit : V,
18-
// expected-error@-1{{object ''dx::HitObject'' is not allowed in patch constant function parameters}}
18+
// expected-error@-1{{object 'dx::HitObject' is not allowed in patch constant function parameters}}
1919
LongVec lv : L)
20-
// expected-error@-1{{object ''dx::HitObject'' is not allowed in patch constant function parameters}}
20+
// expected-error@-1{{object 'dx::HitObject' is not allowed in patch constant function parameters}}
2121
// expected-note@10{{'dx::HitObject' field declared here}}
2222
{
2323
HsConstantData empty;

tools/clang/test/SemaHLSL/hlsl/types/invalid-hitobject-decls-struct.hlsl

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

tools/clang/test/SemaHLSL/hlsl/types/invalid-hitobject-decls-templated.hlsl

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

tools/clang/test/SemaHLSL/hlsl/workgraph/invalid_node_record_type.hlsl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void node07(RWThreadNodeInputRecord<f2x2> input) // expected-error {{'f2x2' (aka
7676

7777
[Shader("node")]
7878
[NodeLaunch("thread")]
79-
void node08(ThreadNodeInputRecord<BAD_RECORD> input) // expected-error {{object ''SamplerState'' is not allowed in node records}}
79+
void node08(ThreadNodeInputRecord<BAD_RECORD> input) // expected-error {{object 'SamplerState' is not allowed in node records}}
8080
{ }
8181

8282
[Shader("node")]
@@ -86,17 +86,17 @@ void node09(ThreadNodeInputRecord<BAD_RECORD[4]> input) // expected-error {{'BAD
8686

8787
[Shader("node")]
8888
[NodeLaunch("thread")]
89-
void node10(RWThreadNodeInputRecord<BAD_RECORD2> input) // expected-error {{object ''SamplerState'' is not allowed in node records}}
89+
void node10(RWThreadNodeInputRecord<BAD_RECORD2> input) // expected-error {{object 'SamplerState' is not allowed in node records}}
9090
{ }
9191

9292
[Shader("node")]
9393
[NodeLaunch("thread")]
94-
void node11(NodeOutput<BAD_RECORD> input) // expected-error {{object ''SamplerState'' is not allowed in node records}}
94+
void node11(NodeOutput<BAD_RECORD> input) // expected-error {{object 'SamplerState' is not allowed in node records}}
9595
{ }
9696

9797
[Shader("node")]
9898
[NodeLaunch("thread")]
99-
void node12(NodeOutputArray<MyBadRecord> output) // expected-error {{object ''SamplerState'' is not allowed in node records}}
99+
void node12(NodeOutputArray<MyBadRecord> output) // expected-error {{object 'SamplerState' is not allowed in node records}}
100100
{ }
101101

102102
[Shader("node")]
@@ -129,7 +129,7 @@ void node16()
129129

130130
ThreadNodeOutputRecords<f2x2> outrec2; // expected-error {{'f2x2' (aka 'matrix<float, 2, 2>') is not valid as a node record type - struct/class required}}
131131

132-
GroupNodeOutputRecords<MyBadRecord> outrec3; // expected-error {{object ''SamplerState'' is not allowed in node records}}
132+
GroupNodeOutputRecords<MyBadRecord> outrec3; // expected-error {{object 'SamplerState' is not allowed in node records}}
133133

134134
ThreadNodeOutputRecords<SamplerState> outrec4; // expected-error {{'SamplerState' is not valid as a node record type - struct/class required}}
135135
}
@@ -151,10 +151,10 @@ void node17(ThreadNodeInputRecord<MyTemplateStruct<int> > input)
151151

152152
[Shader("node")]
153153
[NodeLaunch("thread")]
154-
void node18(ThreadNodeInputRecord<MyTemplateStruct<SamplerState> > input) // expected-error {{object ''SamplerState'' is not allowed in node records}}
154+
void node18(ThreadNodeInputRecord<MyTemplateStruct<SamplerState> > input) // expected-error {{object 'SamplerState' is not allowed in node records}}
155155
{ }
156156

157157
[Shader("node")]
158158
[NodeLaunch("thread")]
159-
void node19(RWThreadNodeInputRecord<MyNestedTemplateStruct> input) // expected-error {{object ''SamplerState'' is not allowed in node records}}
159+
void node19(RWThreadNodeInputRecord<MyNestedTemplateStruct> input) // expected-error {{object 'SamplerState' is not allowed in node records}}
160160
{ }

tools/clang/test/SemaHLSL/template-checks.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %dxc -Tlib_6_3 -verify %s
22

33
Texture2D<float4> t_float4;
4-
Texture2D<SamplerState> t_obj_sampler; /* expected-error {{object ''SamplerState'' is not allowed in type parameters}} fxc-error {{X3124: object element type cannot be an object type}} */
5-
Texture2D<Texture2D<float4> > t_obj_tex; /* expected-error {{object ''Texture2D<float4>'' is not allowed in type parameters}} fxc-error {{X3124: object element type cannot be an object type}} */
4+
Texture2D<SamplerState> t_obj_sampler; /* expected-error {{object 'SamplerState' is not allowed in type parameters}} fxc-error {{X3124: object element type cannot be an object type}} */
5+
Texture2D<Texture2D<float4> > t_obj_tex; /* expected-error {{object 'Texture2D<float4>' is not allowed in type parameters}} fxc-error {{X3124: object element type cannot be an object type}} */
66

77
matrix<SamplerState, 1, 2> m_obj_sampler; /* expected-error {{'SamplerState' cannot be used as a type parameter where a scalar is required}} fxc-error {{X3123: matrix element type must be a scalar type}} */
88
matrix<bool, 1, 2> m_bool;
@@ -15,7 +15,7 @@ matrix<bool, 1, 2> m_bool;
1515

1616
RWBuffer<double3> rwb_struct; /* expected-error {{elements of typed buffers and textures must fit in four 32-bit quantities}} fxc-error {{X3037: elements of typed buffers and textures must fit in four 32-bit quantities}} */
1717

18-
RWBuffer<SamplerState> rwb_struct_objs; /* expected-error {{object ''SamplerState'' is not allowed in type parameters}} */
18+
RWBuffer<SamplerState> rwb_struct_objs; /* expected-error {{object 'SamplerState' is not allowed in type parameters}} */
1919

2020
void vain() {
2121
// Nothing to do here.

0 commit comments

Comments
 (0)