/*
** 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
{
if (idDecl_isDefined (t))
{
- /*@i523 functionClauseList_free (t->clauses); */ /* evans 2002-01-03: splint catches this now! */
+ /* don't: functionClauseList_free (t->clauses); */ /* evans 2002-01-03: splint catches this now! */
qtype_free (t->typ);
cstring_free (t->id);
idDecl_addClauses (idDecl d, functionClauseList clauses)
{
llassert (idDecl_isDefined (d));
- /*@i222*/
+
/*
+ DRL comment out llassert:
+
This breaks on sometypes of functionPointers.
I.e.
void (*signal (int sig ) @requires g >= 0 @ ) (int) @requires g >= 0 @ ;
llassert (functionClauseList_isUndefined (d->clauses));
*/
-
- d->clauses = clauses;
+
+ if (functionClauseList_isUndefined (d->clauses) )
+ {
+ d->clauses = clauses;
+ }
+ else
+ {
+ functionClauseList_free(d->clauses);
+ d->clauses = clauses;
+ }
}