(decl, types, analyze_decl)
| 237 | |
| 238 | |
| 239 | def _dump_unresolved(decl, types, analyze_decl): |
| 240 | if isinstance(decl, str): |
| 241 | typespec = decl |
| 242 | decl, = (d for d in types if d.shortkey == typespec) |
| 243 | elif type(decl) is tuple: |
| 244 | filename, typespec = decl |
| 245 | if '-' in typespec: |
| 246 | found = [d for d in types |
| 247 | if d.shortkey == typespec and d.filename == filename] |
| 248 | #if not found: |
| 249 | # raise NotImplementedError(decl) |
| 250 | decl, = found |
| 251 | else: |
| 252 | found = [d for d in types if d.shortkey == typespec] |
| 253 | if not found: |
| 254 | print(f'*** {typespec} ???') |
| 255 | return |
| 256 | #raise NotImplementedError(decl) |
| 257 | else: |
| 258 | decl, = found |
| 259 | resolved = analyze_decl(decl) |
| 260 | if resolved: |
| 261 | typedeps, _ = resolved or (None, None) |
| 262 | |
| 263 | if decl.kind is KIND.STRUCT or decl.kind is KIND.UNION: |
| 264 | print(f'*** {decl.shortkey} {decl.filename}') |
| 265 | for member, mtype in zip(decl.members, typedeps): |
| 266 | typespec = member.vartype.typespec |
| 267 | if typespec == decl.shortkey: |
| 268 | print(f' ~~~~: {typespec:20} - {member!r}') |
| 269 | continue |
| 270 | status = None |
| 271 | if is_pots(typespec): |
| 272 | mtype = typespec |
| 273 | status = 'okay' |
| 274 | elif is_system_type(typespec): |
| 275 | mtype = typespec |
| 276 | status = 'okay' |
| 277 | elif mtype is None: |
| 278 | if '-' in member.vartype.typespec: |
| 279 | mtype, = [d for d in types |
| 280 | if d.shortkey == member.vartype.typespec |
| 281 | and d.filename == decl.filename] |
| 282 | else: |
| 283 | found = [d for d in types |
| 284 | if d.shortkey == typespec] |
| 285 | if not found: |
| 286 | print(f' ???: {typespec:20}') |
| 287 | continue |
| 288 | mtype, = found |
| 289 | if status is None: |
| 290 | status = 'okay' if types.get(mtype) else 'oops' |
| 291 | if mtype is _SKIPPED: |
| 292 | status = 'okay' |
| 293 | mtype = '<skipped>' |
| 294 | elif isinstance(mtype, FuncPtr): |
| 295 | status = 'okay' |
| 296 | mtype = str(mtype.vartype) |
no test coverage detected
searching dependent graphs…