Skip to content

Commit c42bfb3

Browse files
committed
review: add test to denote consistent comma behaviour
1 parent 18d2885 commit c42bfb3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -fsyntax-only %s -verify
2+
3+
// expected-no-diagnostics
4+
5+
// Test that we have consistent behaviour for comma parsing. Namely:
6+
// - a single trailing comma is allowed after any parameter
7+
// - a trailing comma is not required
8+
9+
[RootSignature("CBV(b0, flags = DATA_VOLATILE,), DescriptorTable(Sampler(s0,),),")]
10+
void maximum_commas() {}
11+
12+
[RootSignature("CBV(b0, flags = DATA_VOLATILE), DescriptorTable(Sampler(s0))")]
13+
void minimal_commas() {}

0 commit comments

Comments
 (0)