Skip to content

Commit 844ba82

Browse files
committed
add cast to cases
1 parent 7f5b3e4 commit 844ba82

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5339,6 +5339,7 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {
53395339
case CK_HLSLVectorTruncation:
53405340
case CK_HLSLArrayRValue:
53415341
case CK_HLSLElementwiseCast:
5342+
case CK_HLSLSplatCast:
53425343
return EmitUnsupportedLValue(E, "unexpected cast lvalue");
53435344

53445345
case CK_Dependent:

clang/lib/CodeGen/CGExprAgg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ static bool castPreservesZero(const CastExpr *CE) {
15991599
case CK_AtomicToNonAtomic:
16001600
case CK_HLSLVectorTruncation:
16011601
case CK_HLSLElementwiseCast:
1602-
// TODO is this true for CK_HLSLSplatCast
1602+
case CK_HLSLSplatCast:
16031603
return true;
16041604

16051605
case CK_BaseToDerivedMemberPointer:

0 commit comments

Comments
 (0)