1#define xFN(TYPE,NAME) TYPE ## _ ## NAME
2#define FN(TYPE,NAME) xFN(TYPE,NAME)
3
4/* Check that there are "n" dimensions of type "type" starting at "first"
5 * in "obj".
6 */
7isl_stat FN(TYPE,check_range)(__isl_keep TYPE *obj,
8 enum isl_dim_type type, unsigned first, unsigned n)
9{
10 isl_size dim;
11
12 dim = FN(TYPE,dim)(multi: obj, type);
13 if (dim < 0)
14 return isl_stat_error;
15 if (first + n > dim || first + n < first)
16 isl_die(FN(TYPE,get_ctx)(obj), isl_error_invalid,
17 "position or range out of bounds",
18 return isl_stat_error);
19 return isl_stat_ok;
20}
21

source code of polly/lib/External/isl/check_type_range_templ.c