MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / _get_essential_category

Method _get_essential_category

addons/misra.py:2529–2539  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

2527
2528 def misra_10_5(self, cfg):
2529 def _get_essential_category(token):
2530 essential_type = getEssentialType(token)
2531 #print(essential_type)
2532 if essential_type:
2533 if essential_type in ('bool', 'char'):
2534 return essential_type
2535 if essential_type.split(' ')[-1] in ('float', 'double'):
2536 return 'floating'
2537 if essential_type.split(' ')[0] in ('unsigned', 'signed'):
2538 return essential_type.split(' ')[0]
2539 return None
2540 for token in cfg.tokenlist:
2541 if not isCast(token):
2542 continue

Callers

nothing calls this directly

Calls 1

getEssentialTypeFunction · 0.85

Tested by

no test coverage detected