X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/1b8ae6904556859bbe91aadf35b8adcc1a0611ce..061ece7d6fedbde47030222fea74b575c12707dc:/src/stateClause.c diff --git a/src/stateClause.c b/src/stateClause.c index 8d196b9..cf2faf0 100644 --- a/src/stateClause.c +++ b/src/stateClause.c @@ -1,6 +1,6 @@ /* ** Splint - annotation-assisted static program checker -** Copyright (C) 1994-2002 University of Virginia, +** Copyright (C) 1994-2003 University of Virginia, ** Massachusetts Institute of Technology ** ** This program is free software; you can redistribute it and/or modify it @@ -17,8 +17,8 @@ ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA. ** -** For information on splint: splint@cs.virginia.edu -** To report a bug: splint-bug@cs.virginia.edu +** For information on splint: info@splint.org +** To report a bug: splint-bug@splint.org ** For more information: http://www.splint.org */ /* @@ -43,6 +43,25 @@ stateClause_createRaw (stateConstraint st, stateClauseKind sk, /*@only@*/ sRefSe return ret; } +/*drl added 3/7/2003*/ +bool stateClause_hasEmptyReferences (stateClause s) +{ + if (sRefSet_isUndefined(s->refs) ) + return TRUE; + else + return FALSE; +} + +bool stateClause_isMetaState (stateClause s) +{ + + if (qual_isMetaState (s->squal) ) + return TRUE; + else + return FALSE; +} +/*end drl added*/ + stateClause stateClause_create (lltok tok, qual q, sRefSet s) { @@ -127,6 +146,11 @@ bool stateClause_isMemoryAllocation (stateClause cl) /* ** An error is reported if the test is NOT true. */ + +# ifdef WIN32 +/* Microsoft doesn't believe in higher order functions... */ +# pragma warning( disable : 4550 ) +# endif sRefTest stateClause_getPreTestFunction (stateClause cl) { @@ -735,7 +759,7 @@ static sRefModVal stateClause_getStateFunction (stateClause cl) } else if (qual_isAliasQual (sq)) { - return (sRefModVal) sRef_setAliasKind; /*@i23 complete? @*/ + return (sRefModVal) sRef_setAliasKind; } else { @@ -753,9 +777,12 @@ int stateClause_getStateParameter (stateClause cl) llassert (cl->kind == SP_QUAL || cl->kind == SP_GLOBAL); sq = cl->squal; - - /*@+relaxtypes@*/ /*@i523 this is wrong, remove the enumint@*/ - /*@+enumint@*/ + + /*@+enumint@*/ + /* + ** Since this can be many different types of state kinds, we need to allow all + ** enum's to be returned as int. + */ if (qual_isNotNull (sq)) {