Skip to content

Commit cedf267

Browse files
inbelicgithub-actions[bot]
authored andcommitted
Automerge: [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (#148649)
- when there are duplicate (equivalent) `RangeInfo`s created we will attempt to `llvm::sort` or `llvm::stable_sort` them, it does not appear deterministic in which order they will be sorted (because they are equivalent) - when `DLLVM_ENABLE_EXSTENSIVE_CHECKS` is enabled, it appears to deal with this tie-breaker sorting the list differently than when it is not enabled, this causes one of the test cases to fail because the diagnostic is produced, not in a different order, but with a different root element associated with an identical `RangeInfo` - functionally this makes no difference to the diagnostic being produced and the removed test-case was added just as a nicety to demonstrate how the diagnostics might look - the test above the removed will correctly demonstrate that the `SourceLocation` will be set to the correct column, and, the `-verify` portion of this testcase will ensure that we still generate a diagnostic for each duplicate - therefore, it is safe to remove this portion of the test-case that can have a non-deterministic association of root element This resolves the build issues reported [here](llvm/llvm-project#147115 (comment)) and [here](llvm/llvm-project#147800 (comment))
2 parents 0fc486b + 76f1ddc commit cedf267

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

clang/test/SemaHLSL/RootSignature-resource-ranges-err.hlsl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,6 @@ void bad_root_signature_14() {}
109109
#define DuplicatesRootSignature \
110110
"CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
111111

112-
// CHECK: [[@LINE-2]]:13: note: expanded from macro 'DuplicatesRootSignature'
113-
// CHECK-NEXT: [[@LINE-3]] | "CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
114-
// CHECK-NEXT: | ^
115-
// CHECK: [[@LINE-5]]:4: note: expanded from macro 'DuplicatesRootSignature'
116-
// CHECK-NEXT: [[@LINE-6]] | "CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
117-
// CHECK-NEXT: | ^
118-
// CHECK: [[@LINE-8]]:22: note: expanded from macro 'DuplicatesRootSignature'
119-
// CHECK-NEXT: [[@LINE-9]] | "CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
120-
// CHECK-NEXT: | ^
121-
// CHECK: [[@LINE-11]]:4: note: expanded from macro 'DuplicatesRootSignature'
122-
// CHECK-NEXT: [[@LINE-12]] | "CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
123-
// CHECK-NEXT: | ^
124-
// CHECK: [[@LINE-14]]:47: note: expanded from macro 'DuplicatesRootSignature'
125-
// CHECK-NEXT: [[@LINE-15]] | "CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
126-
// CHECK-NEXT: | ^
127-
// CHECK: [[@LINE-17]]:4: note: expanded from macro 'DuplicatesRootSignature'
128-
// CHECK-NEXT: [[@LINE-18]] | "CBV(b0), CBV(b0), CBV(b0), DescriptorTable(CBV(b0, numDescriptors = 2))"
129-
// CHECK-NEXT: | ^
130-
131112
// expected-error@+6 {{resource ranges b[0;0] and b[0;0] overlap within space = 0 and visibility = All}}
132113
// expected-note@+5 {{overlapping resource range here}}
133114
// expected-error@+4 {{resource ranges b[0;0] and b[0;0] overlap within space = 0 and visibility = All}}

0 commit comments

Comments
 (0)