MCPcopy Index your code
hub / github.com/cpplint/cpplint / IsOutOfLineMethodDefinition

Function IsOutOfLineMethodDefinition

cpplint.py:6254–6267  ·  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

6252
6253
6254def IsOutOfLineMethodDefinition(clean_lines, linenum):
6255 """Check if current line contains an out-of-line method definition.
6256
6257 Args:
6258 clean_lines: A CleansedLines instance containing the file.
6259 linenum: The number of the line to check.
6260 Returns:
6261 True if current line contains an out-of-line method definition.
6262 """
6263 # Scan back a few lines for start of current function
6264 for i in range(linenum, max(-1, linenum - 10), -1):
6265 if re.match(r"^([^()]*\w+)\(", clean_lines.elided[i]):
6266 return re.match(r"^[^()]*\w+::\w+\(", clean_lines.elided[i]) is not None
6267 return False
6268
6269
6270def IsInitializerList(clean_lines, linenum):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected