MCPcopy Create free account
hub / github.com/tensorflow/tfjs / IsOutOfLineMethodDefinition

Function IsOutOfLineMethodDefinition

tfjs-backend-wasm/tools/cpplint.py:4955–4968  ·  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

4953
4954
4955def IsOutOfLineMethodDefinition(clean_lines, linenum):
4956 """Check if current line contains an out-of-line method definition.
4957
4958 Args:
4959 clean_lines: A CleansedLines instance containing the file.
4960 linenum: The number of the line to check.
4961 Returns:
4962 True if current line contains an out-of-line method definition.
4963 """
4964 # Scan back a few lines for start of current function
4965 for i in xrange(linenum, max(-1, linenum - 10), -1):
4966 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
4967 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
4968 return False
4969
4970
4971def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 2

MatchFunction · 0.85
maxFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…