Skip to content

Commit b953140

Browse files
committed
add sample testcase
1 parent dece8af commit b953140

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

clang/test/SemaHLSL/RootSignature-err.hlsl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify
2+
// RUN: not %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s 2>&1 | FileCheck %s
23

34
// Attr test
45

@@ -22,3 +23,14 @@ void bad_root_signature_4() {}
2223
// expected-error@+1 {{expected ')' to denote end of parameters, or, another valid parameter of RootConstants}}
2324
[RootSignature("RootConstants(b0, num32BitConstants = 1, invalid)")]
2425
void bad_root_signature_5() {}
26+
27+
#define MultiLineRootSignature \
28+
"CBV(b0)," \
29+
"RootConstants(num32BitConstants = 3, b0, invalid)"
30+
31+
// CHECK: note: expanded from macro 'MultiLineRootSignature'
32+
// CHECK-NEXT: [[@LINE-3]] | "RootConstants(num32BitConstants = 3, b0, invalid)"
33+
// CHECK-NEXT: | ^
34+
// expected-error@+1 {{expected ')' to denote end of parameters, or, another valid parameter of RootConstants}}
35+
[RootSignature(MultiLineRootSignature)]
36+
void bad_root_signature_6() {}

0 commit comments

Comments
 (0)