]> andersk Git - splint.git/blobdiff - src/exprChecks.c
Added files
[splint.git] / src / exprChecks.c
index 77bb93b49b3ce3dde834c261e99ab0c677a298f9..44eb80b8969f62f17fb2ee6ddf5e47aa5ab58eee 100644 (file)
@@ -883,6 +883,8 @@ void exprNode_checkFunctionBody (exprNode body)
                }
            }
        }
+
+      exprNode_checkFunction (context_getHeader (), body);
       
       if (!checkret)
        {
@@ -890,13 +892,14 @@ void exprNode_checkFunctionBody (exprNode body)
        }
     }
 }
+/*drl modified */
 
 void exprNode_checkFunction (/*@unused@*/ uentry ue, /*@only@*/ exprNode body)
 {
   constraintList c, t;
+ constraintList c2, fix;
 
-
-  //  return;
+ //  return;
   
   exprNode_generateConstraints (body);
   
@@ -913,9 +916,16 @@ void exprNode_checkFunction (/*@unused@*/ uentry ue, /*@only@*/ exprNode body)
        
        t = reflectChanges (body->requiresConstraints, constraintList_copy (c) );
        body->requiresConstraints = constraintList_copy (t);
+
+       c2  =  constraintList_copy (c);
+       fix =  constraintList_makeFixedArrayConstraints (body->uses);
+       c2  =  reflectChanges (c2, constraintList_copy(fix) );
+
+       t = reflectChanges (body->requiresConstraints, constraintList_copy (c2) );
+       body->requiresConstraints = constraintList_copy (t);
        
        DPRINTF ( (message ("The body has the required cosntraints: %s", constraintList_printDetailed (t) ) ) );
-   t = constraintList_mergeEnsures (c, body->ensuresConstraints);
+       t = constraintList_mergeEnsures (c, body->ensuresConstraints);
 
    body->ensuresConstraints = constraintList_copy (t);
    
@@ -931,9 +941,12 @@ void exprNode_checkFunction (/*@unused@*/ uentry ue, /*@only@*/ exprNode body)
        DPRINTF((message ("The Function %s has no preconditions", uentry_unparse(ue) ) ) );
      }
 
-   ConPrint (message ("Unable to resolve function constraints:\n%s", constraintList_printDetailed(body->requiresConstraints) ), g_currentloc);
+   constraintList_printError(body->requiresConstraints, g_currentloc);
+   constraintList_printError(body->ensuresConstraints, g_currentloc);
+   
+   //   ConPrint (message ("Unable to resolve function constraints:\n%s", constraintList_printDetailed(body->requiresConstraints) ), g_currentloc);
 
-   ConPrint (message ("LCLint has found function post conditions:\n%s", constraintList_printDetailed(body->ensuresConstraints) ), g_currentloc);
+   //   ConPrint (message ("LCLint has found function post conditions:\n%s", constraintList_printDetailed(body->ensuresConstraints) ), g_currentloc);
   
      //  printf ("The required constraints are:\n%s", constraintList_printDetailed(body->requiresConstraints) );
      //   printf ("The ensures constraints are:\n%s", constraintList_printDetailed(body->ensuresConstraints) );
This page took 0.033892 seconds and 4 git commands to generate.