aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
diff options
context:
space:
mode:
authorChris B <chris.bieneman@me.com>2024-02-15 14:58:06 -0600
committerGitHub <noreply@github.com>2024-02-15 14:58:06 -0600
commit5c57fd717d5d6a285efeb8402c6fe0c8f70592f3 (patch)
treecd4b71c05decd37f40090f06456570ad485e044e /clang/lib/Edit/RewriteObjCFoundationAPI.cpp
parentedfc859af89e44207bf499b5d702aa26a7357da4 (diff)
downloadllvm-5c57fd717d5d6a285efeb8402c6fe0c8f70592f3.zip
llvm-5c57fd717d5d6a285efeb8402c6fe0c8f70592f3.tar.gz
llvm-5c57fd717d5d6a285efeb8402c6fe0c8f70592f3.tar.bz2
[HLSL] Vector standard conversions (#71098)
HLSL supports vector truncation and element conversions as part of standard conversion sequences. The vector truncation conversion is a C++ second conversion in the conversion sequence. If a vector truncation is in a conversion sequence an element conversion may occur after it before the standard C++ third conversion. Vector element conversions can be boolean conversions, floating point or integral conversions or promotions. [HLSL Draft Specification](https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf) --------- Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
Diffstat (limited to 'clang/lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--clang/lib/Edit/RewriteObjCFoundationAPI.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
index 2e123e8..22f2c47e 100644
--- a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -1083,6 +1083,10 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg,
case CK_BooleanToSignedIntegral:
llvm_unreachable("OpenCL-specific cast in Objective-C?");
+ case CK_HLSLVectorTruncation:
+ llvm_unreachable("HLSL-specific cast in Objective-C?");
+ break;
+
case CK_FloatingToFixedPoint:
case CK_FixedPointToFloating:
case CK_FixedPointCast: