/*
** 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
** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA.
**
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-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
*/
/*
** qtypes are mutable
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "basic.h"
/*@notnull@*/ qtype qtype_create (ctype c)
qtype qtype_addQual (qtype qt, qual q)
{
+ DPRINTF (("Add qual: %s / %s", qtype_unparse (qt), qual_unparse (q)));
+
if (qtype_isDefined (qt))
{
qt->quals = qualList_add (qt->quals, q);
}
+ DPRINTF (("==> %s", qtype_unparse (qt)));
return qt;
}
-# ifndef NOLCL
qtype qtype_addQualList (/*@returned@*/ qtype qt, qualList ql)
{
if (qtype_isDefined (qt))
return qt;
}
-# endif
static void checkAltQuals (qtype q)
{
}
}
-# ifndef NOLCL
qtype qtype_mergeImplicitAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
{
if (qtype_isDefined (q1) && qtype_isDefined (q2))
qtype_free (q2);
return q1;
}
-# endif
qtype qtype_mergeAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
{
+ DPRINTF (("Merge alt: %s + %s", qtype_unparse (q1), qtype_unparse (q2)));
+
if (qtype_isDefined (q1) && qtype_isDefined (q2))
{
if (context_getFlag (FLG_IMPCONJ))
{
q1->type = ctype_makeExplicitConj (q1->type, q2->type);
}
-
if (!qualList_isEmpty (q2->quals))
{
qtype qtype_combine (/*@returned@*/ qtype q1, ctype ct)
{
+ DPRINTF (("Combine: %s %s", qtype_unparse (q1), ctype_unparse (ct)));
if (qtype_isDefined (q1))
{
/* ct is modifier (or q1->type is unknown) */
q1->type = ctype_combine (q1->type, ct);
}
+ DPRINTF (("Combine: %s %s", qtype_unparse (q1), ctype_unparse (ct)));
return q1;
}
{
if (qtype_isDefined (q))
{
+ DPRINTF (("Resolving: %s", qtype_unparse (q)));
q->type = ctype_resolve (q->type);
+ DPRINTF (("Resolving: %s", qtype_unparse (q)));
}
return q;
{
if (qtype_isDefined (q))
{
+ DPRINTF (("new base: %s -> %s", qtype_unparse (q), ctype_unparse (ct)));
q->type = ctype_newBase (ct, q->type);
+ DPRINTF (("new base: %s -> %s", qtype_unparse (q), ctype_unparse (ct)));
}
return q;
q1->quals = qualList_appendList (q1->quals, q2->quals);
}
+ DPRINTF (("new base: %s -> %s", qtype_unparse (q1), qtype_unparse (q1)));
return q1;
}
-void qtype_adjustPointers (int n, qtype q)
+void qtype_adjustPointers (pointers n, qtype q)
{
if (qtype_isDefined (q))
{
+ DPRINTF (("Pointers: %s %s", pointers_unparse (n), qtype_unparse (q)));
q->type = ctype_adjustPointers (n, q->type);
}
+
+ pointers_free (n);
}
-# ifndef NOLCL
qtype qtype_copy (qtype q)
{
if (qtype_isDefined (q))
return qtype_undefined;
}
}
-# endif