]> andersk Git - splint.git/blobdiff - src/idDecl.c
Fixed but with parenthesized pointer declarations.
[splint.git] / src / idDecl.c
index f6d73107e7f03f1d5cb394b7e874a2903567afc1..851c622819faa34d89aa4a2ac9bea090aa881c7e 100644 (file)
@@ -224,6 +224,25 @@ idDecl_expectFunction (/*@returned@*/ idDecl d)
   return d;
 }
 
+/*
+** evans 2002-02-09: This is a bit of a kludge, but we 
+** need it to fix declarations like int (*p)[];
+*/
+
+void
+idDecl_notExpectingFunction (/*@returned@*/ idDecl d)
+{
+  if (idDecl_isDefined (d)) 
+    {
+      ctype ct = qtype_getType (d->typ);
+
+      if (ctype_isExpFcn (ct))
+       {
+         qtype_setType (d->typ, ctype_dontExpectFunction (ct));
+       }
+    }
+}
+
 void
 idDecl_addClauses (idDecl d, functionClauseList clauses)
 {
This page took 0.03064 seconds and 4 git commands to generate.