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)
| 5876 | |
| 5877 | |
| 5878 | def ExpectingFunctionArgs(clean_lines, linenum): |
| 5879 | """Checks whether where function type arguments are expected. |
| 5880 | |
| 5881 | Args: |
| 5882 | clean_lines: A CleansedLines instance containing the file. |
| 5883 | linenum: The number of the line to check. |
| 5884 | |
| 5885 | Returns: |
| 5886 | True if the line at 'linenum' is inside something that expects arguments |
| 5887 | of function types. |
| 5888 | """ |
| 5889 | line = clean_lines.elided[linenum] |
| 5890 | return (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or |
| 5891 | (linenum >= 2 and |
| 5892 | (Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$', |
| 5893 | clean_lines.elided[linenum - 1]) or |
| 5894 | Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$', |
| 5895 | clean_lines.elided[linenum - 2]) or |
| 5896 | Search(r'\bstd::m?function\s*\<\s*$', |
| 5897 | clean_lines.elided[linenum - 1])))) |
| 5898 | |
| 5899 | |
| 5900 | _HEADERS_CONTAINING_TEMPLATES = ( |
no test coverage detected