diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index 14f6929037ff5..ad923a52a4ce1 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -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(); - 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; }