GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/parse/compat_func.c Lines: 11 11 100.0 %
Date: 2020-09-14 20:46:08 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
823
ANN m_bool compat_func(const restrict Func_Def lhs, const restrict Func_Def rhs) {
6
823
  Arg_List e1 = lhs->base->args;
7
823
  Arg_List e2 = rhs->base->args;
8
9

1741
  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

792
  if(e1 || e2)
16
51
    return GW_ERROR;
17
741
  return GW_OK;
18
}