Skip to content

Commit 5e9a096

Browse files
committed
A few minor fixups to use C++ rather than C and Windows-isms
1 parent 317f1d9 commit 5e9a096

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/HLSL/HLOperationLower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ Value *TrivialUnaryOperationRet(CallInst *CI, IntrinsicOp IOP,
542542
Value *TrivialDxilUnaryOperation(OP::OpCode OpCode, Value *Src, hlsl::OP *Op,
543543
IRBuilder<> &Builder,
544544
bool SupportsVectors = false) {
545-
Type *Ty = src->getType();
545+
Type *Ty = Src->getType();
546546

547547
Constant *OpArg = Op->GetU32Const((unsigned)OpCode);
548548
Value *Args[] = {OpArg, Src};

tools/clang/lib/Sema/SemaHLSL.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6606,8 +6606,10 @@ bool HLSLExternalSource::MatchArguments(
66066606
argTypes.clear();
66076607
const bool isVariadic = IsVariadicIntrinsicFunction(pIntrinsic);
66086608

6609-
static const UINT UnusedSize = UINT_MAX;
6610-
static const BYTE MaxIntrinsicArgs = g_MaxIntrinsicParamCount + 1;
6609+
static const uint32_t UnusedSize = std::numeric_limits<uint32_t>::max();
6610+
static const uint32_t MaxIntrinsicArgs = g_MaxIntrinsicParamCount + 1;
6611+
assert(MaxIntrinsicArgs < std::numeric_limits<uint8_t>::max() &&
6612+
"This should be a pretty small number");
66116613
#define CAB(cond, arg) \
66126614
{ \
66136615
if (!(cond)) { \

0 commit comments

Comments
 (0)