aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp b/contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
index d5bf553e2412..81797c8c4dc7 100644
--- a/contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/contrib/llvm-project/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -697,11 +697,7 @@ static bool getLiteralInfo(SourceRange literalRange,
struct Suff {
static bool has(StringRef suff, StringRef &text) {
- if (text.ends_with(suff)) {
- text = text.substr(0, text.size()-suff.size());
- return true;
- }
- return false;
+ return text.consume_back(suff);
}
};
@@ -1004,6 +1000,7 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg,
case CK_LValueToRValue:
case CK_NoOp:
case CK_UserDefinedConversion:
+ case CK_HLSLArrayRValue:
break;
case CK_IntegralCast: {
@@ -1087,6 +1084,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: