MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / FindHeader

Method FindHeader

util/cpplint.py:725–738  ·  view source on GitHub ↗

Check if a header has already been included. Args: header: header to check. Returns: Line number of previous occurrence, or -1 if the header has not been seen before.

(self, header)

Source from the content-addressed store, hash-verified

723 self.ResetSection('')
724
725 def FindHeader(self, header):
726 """Check if a header has already been included.
727
728 Args:
729 header: header to check.
730 Returns:
731 Line number of previous occurrence, or -1 if the header has not
732 been seen before.
733 """
734 for section_list in self.include_list:
735 for f in section_list:
736 if f[0] == header:
737 return f[1]
738 return -1
739
740 def ResetSection(self, directive):
741 """Reset section checking for preprocessor directive.

Callers 1

CheckIncludeLineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected