MCPcopy Create free account
hub / github.com/alibaba/GraphScope / IsOutOfLineMethodDefinition

Function IsOutOfLineMethodDefinition

analytical_engine/misc/cpplint.py:5499–5512  ·  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

5497
5498
5499def IsOutOfLineMethodDefinition(clean_lines, linenum):
5500 """Check if current line contains an out-of-line method definition.
5501
5502 Args:
5503 clean_lines: A CleansedLines instance containing the file.
5504 linenum: The number of the line to check.
5505 Returns:
5506 True if current line contains an out-of-line method definition.
5507 """
5508 # Scan back a few lines for start of current function
5509 for i in xrange(linenum, max(-1, linenum - 10), -1):
5510 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
5511 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
5512 return False
5513
5514
5515def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 1

MatchFunction · 0.70

Tested by

no test coverage detected