diff --git a/src/AST/MulNode.cpp b/src/AST/MulNode.cpp index 3662540..9b6281f 100644 --- a/src/AST/MulNode.cpp +++ b/src/AST/MulNode.cpp @@ -20,5 +20,6 @@ llvm::Value* MulNode::codegen(IRBuilder* generator) return generator->getBuilder()->CreateSDiv(left->codegen(generator), right->codegen(generator)); default: assert(0 && "unreachable"); + return nullptr; } } \ No newline at end of file diff --git a/src/AST/SumNode.cpp b/src/AST/SumNode.cpp index aa06956..39cc1e4 100644 --- a/src/AST/SumNode.cpp +++ b/src/AST/SumNode.cpp @@ -20,5 +20,6 @@ llvm::Value* SumNode::codegen(IRBuilder* generator) return generator->getBuilder()->CreateSub(left->codegen(generator), right->codegen(generator)); default: assert(0 && "unreachable"); + return nullptr; } } \ No newline at end of file