Skip to content

Commit 7cf3c6c

Browse files
authored
[Bugfix:Autograding] fix compilation warning (#72)
Co-authored-by: Barb Cutler <Barb Cutler>
1 parent 3f51871 commit 7cf3c6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

commonAST/traversal.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "traversal.h"
22
#include "parser.h"
3+
#include <cassert>
34

45
using namespace std;
56

@@ -218,7 +219,9 @@ int CounterVisitor::getComplexity() const{
218219
}
219220

220221
string CounterVisitor::getClassesAndBases() const{
221-
222+
// This function was previously empty (no return statement).
223+
assert (0);
224+
return "";
222225
}
223226

224227
void CounterVisitor::visit(For* f){

0 commit comments

Comments
 (0)