]> andersk Git - splint.git/blobdiff - src/idDecl.c
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / idDecl.c
index 76ba025d9b143ed5ceb44eb2493f9ad2ecbb2016..d60e65e939d8aab5435714fbd429a828bff52c06 100644 (file)
@@ -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
@@ -51,7 +51,7 @@ idDecl_free (idDecl t)
 {
   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);
 
@@ -247,8 +247,10 @@ void
 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 @ ;
@@ -256,6 +258,14 @@ idDecl_addClauses (idDecl d, functionClauseList clauses)
     llassert (functionClauseList_isUndefined (d->clauses));
 
   */
-  
-  d->clauses = clauses;
+
+  if (functionClauseList_isUndefined (d->clauses) )
+    {
+      d->clauses = clauses;
+    }
+  else
+    {
+      functionClauseList_free(d->clauses);
+      d->clauses = clauses;
+    }
 }
This page took 0.0421 seconds and 4 git commands to generate.