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

Method getInitDump

addons/misra_9.py:55–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 return self.parent.getLongName() + "." + self.name if self.parent else self.name
54
55 def getInitDump(self):
56 t = []
57 if self.isPositional:
58 t.append('P')
59 if self.isDesignated:
60 t.append('D')
61 if self.numInits == 0:
62 t.append('_')
63 if self.numInits > 1:
64 t.append(str(self.numInits))
65
66 myDump = "".join(t)
67
68 if len(self.children):
69 childDumps = []
70 for c in self.children:
71 childDumps.append(c.getInitDump())
72 if self.structureViolationToken is not None:
73 myDump += "!"
74 myDump += "{ " + ", ".join(childDumps) + " }"
75
76 return myDump
77
78 def addChild(self, child):
79 self.children.append(child)

Callers

nothing calls this directly

Calls 2

strFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected