MCPcopy Create free account
hub / github.com/alibaba/graph-learn / IsOutOfLineMethodDefinition

Function IsOutOfLineMethodDefinition

dynamic_graph_service/ci/cpplint.py:5205–5218  ·  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

5203
5204
5205def IsOutOfLineMethodDefinition(clean_lines, linenum):
5206 """Check if current line contains an out-of-line method definition.
5207
5208 Args:
5209 clean_lines: A CleansedLines instance containing the file.
5210 linenum: The number of the line to check.
5211 Returns:
5212 True if current line contains an out-of-line method definition.
5213 """
5214 # Scan back a few lines for start of current function
5215 for i in xrange(linenum, max(-1, linenum - 10), -1):
5216 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
5217 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
5218 return False
5219
5220
5221def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 1

MatchFunction · 0.85

Tested by

no test coverage detected