diff options
author | ᴀᴇꜱᴏᴘʜᴏʀ <m.aesophor@gmail.com> | 2021-10-30 21:56:42 +0800 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2021-11-02 11:06:57 +0000 |
commit | a601685e34c61658f85d836a94f785192a5b426b (patch) | |
tree | 72e57e7eaaa00f28a309e15faec122009e8148e4 /lib | |
parent | 95e1255fa864c4739da1d0bbd450d704de61a173 (diff) | |
download | klee-a601685e34c61658f85d836a94f785192a5b426b.tar.gz |
Core/Executor: use `nullptr` instead of `0`
Since KLEE requires C++14, we should prefer `nullptr` to plain `0`.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Core/Executor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 74ca7fb7..dcb078df 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -1048,7 +1048,7 @@ Executor::fork(ExecutionState ¤t, ref<Expr> condition, bool isInternal) { if (!success) { current.pc = current.prevPC; terminateStateEarly(current, "Query timed out (fork)."); - return StatePair(0, 0); + return StatePair(nullptr, nullptr); } if (!isSeeding) { @@ -1133,7 +1133,7 @@ Executor::fork(ExecutionState ¤t, ref<Expr> condition, bool isInternal) { } } - return StatePair(¤t, 0); + return StatePair(¤t, nullptr); } else if (res==Solver::False) { if (!isInternal) { if (pathWriter) { @@ -1141,7 +1141,7 @@ Executor::fork(ExecutionState ¤t, ref<Expr> condition, bool isInternal) { } } - return StatePair(0, ¤t); + return StatePair(nullptr, ¤t); } else { TimerStatIncrementer timer(stats::forkTime); ExecutionState *falseState, *trueState = ¤t; @@ -1212,7 +1212,7 @@ Executor::fork(ExecutionState ¤t, ref<Expr> condition, bool isInternal) { if (MaxDepth && MaxDepth<=trueState->depth) { terminateStateEarly(*trueState, "max-depth exceeded."); terminateStateEarly(*falseState, "max-depth exceeded."); - return StatePair(0, 0); + return StatePair(nullptr, nullptr); } return StatePair(trueState, falseState); @@ -2110,7 +2110,7 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { case Instruction::Ret: { ReturnInst *ri = cast<ReturnInst>(i); KInstIterator kcaller = state.stack.back().caller; - Instruction *caller = kcaller ? kcaller->inst : 0; + Instruction *caller = kcaller ? kcaller->inst : nullptr; bool isVoidReturn = (ri->getNumOperands() == 0); ref<Expr> result = ConstantExpr::alloc(0, Expr::Bool); |