/*
** 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
** 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
*/
/*
}
}
+functionClauseList
+functionClauseList_setImplictConstraints (/*@returned@*/ functionClauseList s)
+{
+ bool addedConstraints;
+
+ constraintList c;
+
+ DPRINTF ((message ("functionClauseList_setImplictConstraints called ") ));
+
+ addedConstraints = FALSE;
+
+
+ c = getImplicitFcnConstraints ();
+
+ if (constraintList_isEmpty(c) )
+ {
+ return s;
+ }
+
+ functionClauseList_elements(s, el)
+ {
+ if (functionClause_isRequires(el))
+ {
+ functionConstraint con = functionClause_getRequires(el);
+
+ if (functionConstraint_hasBufferConstraint(con))
+ {
+ if (functionConstraint_isBufferConstraint (con))
+ {
+ constraintList implCons = getImplicitFcnConstraints ();
+
+ DPRINTF ((message ("functionClauseList_ImplictConstraints adding the implict constraints: %s to %s",
+ constraintList_print(implCons), constraintList_print (con->constraint.buffer))));
+
+ functionConstraint_addBufferConstraints (con, constraintList_copy (implCons) );
+
+ addedConstraints = TRUE;
+
+ DPRINTF ((message ("functionClauseList_ImplictConstraints the new constraint is %s",
+ functionConstraint_unparse (con))));
+
+ }
+ else
+ {
+ llassert (FALSE);
+ /*@i2523 fix this */
+ }
+ }
+ }
+ }
+
+ end_functionClauseList_elements;
+
+ if (!addedConstraints)
+ {
+ functionConstraint fCon;
+ functionClause fClause;
+
+ constraintList implCons = getImplicitFcnConstraints ();
+
+ fCon = functionConstraint_createBufferConstraint(constraintList_copy (implCons) );
+ fClause = functionClause_createRequires(fCon);
+ s = functionClauseList_add(s, fClause);
+
+
+ }
+ return s;
+}