Checks whether where function type arguments are expected. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if the line at 'linenum' is inside something that expects arguments of function types.
(clean_lines, linenum)
| 5322 | |
| 5323 | |
| 5324 | def ExpectingFunctionArgs(clean_lines, linenum): |
| 5325 | """Checks whether where function type arguments are expected. |
| 5326 | |
| 5327 | Args: |
| 5328 | clean_lines: A CleansedLines instance containing the file. |
| 5329 | linenum: The number of the line to check. |
| 5330 | |
| 5331 | Returns: |
| 5332 | True if the line at 'linenum' is inside something that expects arguments |
| 5333 | of function types. |
| 5334 | """ |
| 5335 | line = clean_lines.elided[linenum] |
| 5336 | return (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or |
| 5337 | (linenum >= 2 and |
| 5338 | (Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$', |
| 5339 | clean_lines.elided[linenum - 1]) or |
| 5340 | Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$', |
| 5341 | clean_lines.elided[linenum - 2]) or |
| 5342 | Search(r'\bstd::m?function\s*\<\s*$', |
| 5343 | clean_lines.elided[linenum - 1])))) |
| 5344 | |
| 5345 | |
| 5346 | _HEADERS_CONTAINING_TEMPLATES = ( |
no test coverage detected