GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/parse/compat_func.c Lines: 11 11 100.0 %
Date: 2020-09-14 00:22:58 Branches: 10 10 100.0 %

Line Branch Exec Source
1
#include "gwion_util.h"
2
#include "gwion_ast.h"
3
#include "gwion_env.h"
4
5
822
ANN m_bool compat_func(const restrict Func_Def lhs, const restrict Func_Def rhs) {
6
822
  Arg_List e1 = lhs->base->args;
7
822
  Arg_List e2 = rhs->base->args;
8
9

1739
  while(e1 && e2) {
10
126
    if(e1->type != e2->type)
11
31
      return GW_ERROR;
12
95
    e1 = e1->next;
13
95
    e2 = e2->next;
14
  }
15

791
  if(e1 || e2)
16
51
    return GW_ERROR;
17
740
  return GW_OK;
18
}