** 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
*/
static bool exprNode_handleError(/*@dependent@*/ exprNode p_e);
+static void exprNode_stmt ( /*@dependent@*/ /*@temp@*/ exprNode p_e);
+
static bool exprNode_isMultiStatement(/*@dependent@*/ exprNode p_e);
static void exprNode_multiStatement (/*@dependent@*/ exprNode p_e);
if (exprNode_isUnhandled (e) )
{
DPRINTF((message("Warning ignoring %s", exprNode_unparse (e) ) ) );
- return FALSE;
+ return FALSE;
}
DPRINTF((message ("exprNode_generateConstraints Analysising %s at %s", exprNode_unparse( e),
}
else
{
- fileloc loc;
+/* fileloc loc; */
- loc = exprNode_getNextSequencePoint(e);
- exprNode_exprTraverse(e, FALSE, FALSE, loc);
+/* loc = exprNode_getNextSequencePoint(e); */
+/* exprNode_exprTraverse(e, FALSE, FALSE, loc); */
- fileloc_free(loc);
+/* fileloc_free(loc); */
+
+ exprNode_stmt(e);
return FALSE;
+
}
{
constraintList_free(tempList);
return;
}
+
+ /*drl 2/13/002 patched bug so return statement will be checked*/
+ /*return is a stmt not not expression ...*/
+ if (e->kind == XPR_RETURN)
+ {
+ constraintList tempList;
+
+ loc = exprNode_getNextSequencePoint(e); /* reduces to an expression */
+
+ exprNode_exprTraverse (exprData_getSingle (e->edata), FALSE, TRUE, loc);
+ fileloc_free(loc);
+
+ tempList = e->requiresConstraints;
+ e->requiresConstraints = exprNode_traversRequiresConstraints(e);
+ constraintList_free(tempList);
+ }
if (e->kind != XPR_STMT)
{
{
exprNode_multiStatement (e); /* evans 2001-08-21: spurious return removed */
}
-
- DPRINTF((message ("Ignoring non-statement %s", exprNode_unparse(e) ) ) );
- return;
+ else
+ {
+ loc = exprNode_getNextSequencePoint(e); /* reduces to an expression */
+
+ exprNode_exprTraverse (e, FALSE, TRUE, loc);
+ fileloc_free(loc);
+
+ }
+ return;
}
DPRINTF (("Stmt") );
ctype ct, rt;
- TPRINTF((
+ DPRINTF((
message("doing findStructs: %s", exprNodeList_unparse(arglist) )
));