From: evans1629 Date: Wed, 13 Aug 2003 02:34:29 +0000 (+0000) Subject: Fixed manual csvoverwrite. X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/commitdiff_plain/10fac4bc6190bcda80bf75e7267cb456e5a8b772 Fixed manual csvoverwrite. Fixed && and || for non-predicate guards. --- diff --git a/doc/manual.doc b/doc/manual.doc index aa37b38..76d469b 100644 Binary files a/doc/manual.doc and b/doc/manual.doc differ diff --git a/src/context.c b/src/context.c index 2eee86b..6493cc1 100644 --- a/src/context.c +++ b/src/context.c @@ -1579,7 +1579,7 @@ context_enterUnknownMacro (/*@dependent@*/ uentry e) void context_enterAndClause (exprNode e) { - + DPRINTF (("enter and clause: %s", exprNode_unparse (e))); usymtab_trueBranch (guardSet_copy (exprNode_getGuards (e))); pushClause (ANDCLAUSE); } diff --git a/src/exprNode.c b/src/exprNode.c index bdd0870..dca9548 100644 --- a/src/exprNode.c +++ b/src/exprNode.c @@ -1011,6 +1011,7 @@ exprNode exprNode_createId (/*@observer@*/ uentry c) } e->guards = guardSet_new (); + e->sets = sRefSet_new (); e->msets = sRefSet_new (); e->uses = sRefSet_new (); @@ -5369,10 +5370,14 @@ exprNode_makeOp (/*@keep@*/ exprNode e1, /*@keep@*/ exprNode e2, if (opid == OR_OP) { + exprNode_produceGuards (e2); ret->guards = guardSet_or (ret->guards, e2->guards); } else if (opid == AND_OP) { + exprNode_produceGuards (e2); /* evans 2003-08-13: need to produce guards for expression */ + /* Shouldn't this have already happened? */ + DPRINTF (("Anding guards: %s / %s", guardSet_unparse (ret->guards), guardSet_unparse (e2->guards))); ret->guards = guardSet_and (ret->guards, e2->guards); } else diff --git a/src/usymtab.c b/src/usymtab.c index 0243fb3..7a3a097 100644 --- a/src/usymtab.c +++ b/src/usymtab.c @@ -2749,6 +2749,10 @@ usymtab_popAndBranch (exprNode pred, /*@unused@*/ exprNode expr) } } + DPRINTF (("Popping and: %s / %s", + guardSet_unparse (utab->guards), + guardSet_unparse (exprNode_getGuards (pred)))); + utab->guards = guardSet_levelUnionFree (utab->guards, guardSet_invert (exprNode_getGuards (pred)), utab->lexlevel);