Index: clang/lib/AST/ExprConstant.cpp =================================================================== --- clang/lib/AST/ExprConstant.cpp +++ clang/lib/AST/ExprConstant.cpp @@ -721,7 +721,7 @@ /// StepsLeft - The remaining number of evaluation steps we're permitted /// to perform. This is essentially a limit for the number of statements /// we will evaluate. - unsigned StepsLeft; + int StepsLeft; /// BottomFrame - The frame in which evaluation started. This must be /// initialized after CurrentCall and CallStackDepth. @@ -898,7 +898,8 @@ FFDiag(S->getBeginLoc(), diag::note_constexpr_step_limit_exceeded); return false; } - --StepsLeft; + if (StepsLeft > 0) + --StepsLeft; return true; }