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

Function IsOutOfLineMethodDefinition

util/cpplint.py:4877–4890  ·  view source on GitHub ↗

Check if current line contains an out-of-line method definition. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains an out-of-line method definition.

(clean_lines, linenum)

Source from the content-addressed store, hash-verified

4875
4876
4877def IsOutOfLineMethodDefinition(clean_lines, linenum):
4878 """Check if current line contains an out-of-line method definition.
4879
4880 Args:
4881 clean_lines: A CleansedLines instance containing the file.
4882 linenum: The number of the line to check.
4883 Returns:
4884 True if current line contains an out-of-line method definition.
4885 """
4886 # Scan back a few lines for start of current function
4887 for i in range(linenum, max(-1, linenum - 10), -1):
4888 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
4889 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
4890 return False
4891
4892
4893def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 1

MatchFunction · 0.85

Tested by

no test coverage detected