]> andersk Git - splint.git/blobdiff - src/qtype.c
noexpand always false.
[splint.git] / src / qtype.c
index 5a4a20be653099fe592668388dfee3bd5e032656..beef293460b4cf7affac452e729f2af70c9bdc78 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
@@ -56,15 +56,17 @@ qtype qtype_unknown ()
 
 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))
@@ -74,7 +76,6 @@ qtype qtype_addQualList (/*@returned@*/ qtype qt, qualList ql)
 
   return qt;
 }
-# endif
 
 static void checkAltQuals (qtype q)
 {
@@ -102,7 +103,6 @@ static void checkAltQuals (qtype q)
     }
 }
 
-# ifndef NOLCL
 qtype qtype_mergeImplicitAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
 {
   if (qtype_isDefined (q1) && qtype_isDefined (q2))
@@ -118,7 +118,6 @@ qtype qtype_mergeImplicitAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
   qtype_free (q2);
   return q1;
 }
-# endif
 
 qtype qtype_mergeAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
 {
@@ -147,12 +146,14 @@ qtype qtype_mergeAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
 
 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;
 }
 
@@ -160,7 +161,9 @@ qtype qtype_resolve (/*@returned@*/ qtype q)
 {
   if (qtype_isDefined (q))
     {
+      DPRINTF (("Resolving: %s", qtype_unparse (q)));
       q->type = ctype_resolve (q->type);
+      DPRINTF (("Resolving: %s", qtype_unparse (q)));
     }
 
   return q;
@@ -183,7 +186,9 @@ qtype qtype_newBase (/*@returned@*/ qtype q, ctype ct)
 {
   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;
@@ -197,18 +202,21 @@ qtype qtype_newQbase (qtype q1, qtype q2)
       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))
@@ -224,4 +232,3 @@ qtype qtype_copy (qtype q)
       return qtype_undefined;
     }
 }
-# endif
This page took 0.058503 seconds and 4 git commands to generate.