X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/3cf0f8a8618810aaaf7ece472e8b2c28a9c7b4f0..f5ac53de936db2ac22f6878d5516e00c222a395f:/src/constraint.c diff --git a/src/constraint.c b/src/constraint.c index 826d9b4..877613a 100644 --- a/src/constraint.c +++ b/src/constraint.c @@ -2,6 +2,8 @@ ** constraintList.c */ +//#define DEBUGPRINT 1 + # include /* for isdigit */ # include "lclintMacros.nf" # include "basic.h" @@ -27,8 +29,8 @@ constraint makeConstraintParse (sRef x, lltok relOp, exprNode cconstant) int c; constraint ret; ret = constraint_makeNew(); - llassert (x); - if (!x) + llassert (sRef_isValid(x) ); + if (!sRef_isValid(x)) return ret; @@ -391,11 +393,28 @@ cstring arithType_print (arithType ar) return st; } +void constraint_printError (constraint c, fileloc loc) +{ + cstring string; + + string = constraint_printDetailed (c); + + if (c->post) + { + voptgenerror (FLG_FUNCTIONPOST, string, loc); + } + else + { + voptgenerror (FLG_FUNCTIONCONSTRAINT, string, loc); + } + +} cstring constraint_printDetailed (constraint c) { cstring st = cstring_undefined; + if (!c->post) { if (c->orig) @@ -414,7 +433,7 @@ cstring constraint_printDetailed (constraint c) return st; } -cstring constraint_print (constraint c) +cstring constraint_print (constraint c) /*@*/ { cstring st = cstring_undefined; cstring type = cstring_undefined;