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)
| 5244 | |
| 5245 | |
| 5246 | def ExpectingFunctionArgs(clean_lines, linenum): |
| 5247 | """Checks whether where function type arguments are expected. |
| 5248 | |
| 5249 | Args: |
| 5250 | clean_lines: A CleansedLines instance containing the file. |
| 5251 | linenum: The number of the line to check. |
| 5252 | |
| 5253 | Returns: |
| 5254 | True if the line at 'linenum' is inside something that expects arguments |
| 5255 | of function types. |
| 5256 | """ |
| 5257 | line = clean_lines.elided[linenum] |
| 5258 | return (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or |
| 5259 | (linenum >= 2 and |
| 5260 | (Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$', |
| 5261 | clean_lines.elided[linenum - 1]) or |
| 5262 | Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$', |
| 5263 | clean_lines.elided[linenum - 2]) or |
| 5264 | Search(r'\bstd::m?function\s*\<\s*$', |
| 5265 | clean_lines.elided[linenum - 1])))) |
| 5266 | |
| 5267 | |
| 5268 | _HEADERS_CONTAINING_TEMPLATES = ( |
no test coverage detected