diff --git a/tools/clang/lib/AST/ExprConstant.cpp b/tools/clang/lib/AST/ExprConstant.cpp index c24e44022f..fae94fbc96 100644 --- a/tools/clang/lib/AST/ExprConstant.cpp +++ b/tools/clang/lib/AST/ExprConstant.cpp @@ -3784,6 +3784,8 @@ static bool HandleIntrinsicCall(SourceLocation CallLoc, unsigned opcode, assert(Args.size() == 1 && "else call should be invalid"); if (ArgValues[0].isInt()) { Result = ArgValues[0]; + // The result of bitwise cast to uint will be unsigned. + Result.getInt().setIsSigned(false); } else if (ArgValues[0].isFloat()) { const bool isUnsignedTrue = true;