Skip to content

Commit 87f3030

Browse files
committed
Update tests after latest merge from main
- add -Wno-hlsl-implicit-binding - add test case with space-only annotation
1 parent 1325b1c commit 87f3030

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,13 +1548,11 @@ void SemaHLSL::handleResourceBindingAttr(Decl *TheDecl, const ParsedAttr &AL) {
15481548
if (AL.getNumArgs() == 2) {
15491549
Slot = Loc->getIdentifierInfo()->getName();
15501550
SlotLoc = Loc->getLoc();
1551-
15521551
if (!AL.isArgIdent(1)) {
15531552
Diag(AL.getLoc(), diag::err_attribute_argument_type)
15541553
<< AL << AANT_ArgumentIdentifier;
15551554
return;
15561555
}
1557-
15581556
Loc = AL.getArgAsIdent(1);
15591557
Space = Loc->getIdentifierInfo()->getName();
15601558
SpaceLoc = Loc->getLoc();

clang/test/AST/HLSL/resource_binding_attr.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -ast-dump -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -Wno-hlsl-implicit-binding -triple dxil-pc-shadermodel6.3-library -finclude-default-header -ast-dump -o - %s | FileCheck %s
22

33
// CHECK: HLSLBufferDecl {{.*}} line:[[# @LINE + 4]]:9 cbuffer CB
44
// CHECK-NEXT: HLSLResourceClassAttr {{.*}} Implicit CBuffer

clang/test/SemaHLSL/resource_binding_implicit.hlsl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ RWBuffer<int> c;
1414
// No warning - explicit binding.
1515
RWBuffer<float> d : register(u0);
1616

17-
// TODO: Add this test once #135287 lands
18-
// TODO: ... @+1 {{resource has implicit register binding}}
19-
// TODO: RWBuffer<float> dd : register(space1);
17+
// expected-warning@+1 {{resource has implicit register binding}}
18+
RWBuffer<float> dd : register(space1);
2019

2120
// No warning - explicit binding.
2221
RWBuffer<float> ddd : register(u3, space4);

0 commit comments

Comments
 (0)