Skip to content

Commit cbe0540

Browse files
committed
change check to assert
Signed-off-by: Nathan Gauër <[email protected]>
1 parent 8b239ab commit cbe0540

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/clang/lib/Sema/SemaHLSL.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15227,8 +15227,10 @@ bool Sema::CheckHLSLIntrinsicCall(FunctionDecl *FDecl, CallExpr *TheCall) {
1522715227
// to limit the scope, and fail gracefully in some cases.
1522815228
if (!getLangOpts().SPIRV)
1522915229
return false;
15230-
if (FDecl->getName() != "GetAttributeAtVertex")
15231-
return false;
15230+
// This should never happen for SPIR-V. But on the DXIL side, extension can be added by
15231+
// inserting new intrinsics, meaning opcodes can collide with existing ones.
15232+
// See the ExtensionTest.EvalAttributeCollision test.
15233+
assert(FDecl->getName() == "GetAttributeAtVertex");
1523215234
return CheckIntrinsicGetAttributeAtVertex(this, FDecl, TheCall);
1523315235
default:
1523415236
break;

0 commit comments

Comments
 (0)