X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/d5047b9135351b2240dbe50c224bd95cf3fe5d64..a6bfbad8f5ae6b3544a2c767e449ee095aad8978:/src/ctype.c diff --git a/src/ctype.c b/src/ctype.c index 81cc6aa..7fc16c4 100644 --- a/src/ctype.c +++ b/src/ctype.c @@ -236,7 +236,8 @@ ctype_realishType (ctype c) bool ctype_isUA (ctype c) { - return (!ctype_isUnknown (c) && ctbase_isUA (ctype_getCtbase (c))); + return (!ctype_isUnknown (c) + && ctbase_isUA (ctype_getCtbase (c))); } bool @@ -1997,13 +1998,14 @@ ctype_getBaseType (ctype c) } ctype -ctype_adjustPointers (int np, ctype c) +ctype_adjustPointers (pointers p, ctype c) { - + int np = pointers_depth (p); + if (ctype_isFunction (c)) { c = ctype_makeParamsFunction - (ctype_adjustPointers (np, ctype_getReturnType (c)), + (ctype_adjustPointers (p, ctype_getReturnType (c)), uentryList_copy (ctype_argsFunction (c))); } else @@ -2211,6 +2213,16 @@ ctype_createForwardUnion (cstring n) return (ct); } +ctype +ctype_createForwardEnum (cstring n) +{ + uentry ue = uentry_makeEnumTag (n, ctype_unknown, fileloc_undefined); + ctype ct = usymtab_supForwardTypeEntry (ue); + + cstring_free (n); + return (ct); +} + ctype ctype_removePointers (ctype c) {