Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions clang/lib/AST/ByteCode/InterpBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,13 @@ static bool interp__builtin_isinf(InterpState &S, CodePtr OpPC,
const InterpFrame *Frame, bool CheckSign,
const CallExpr *Call) {
const Floating &Arg = S.Stk.pop<Floating>();
bool IsInf = Arg.isInf();
APFloat F = Arg.getAPFloat();
bool IsInf = F.isInfinity();

if (CheckSign)
pushInteger(S, IsInf ? (Arg.isNegative() ? -1 : 1) : 0, Call->getType());
pushInteger(S, IsInf ? (F.isNegative() ? -1 : 1) : 0, Call->getType());
else
pushInteger(S, Arg.isInf(), Call->getType());
pushInteger(S, IsInf, Call->getType());
return true;
}

Expand Down