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)
| 5863 | |
| 5864 | |
| 5865 | def ExpectingFunctionArgs(clean_lines, linenum): |
| 5866 | """Checks whether where function type arguments are expected. |
| 5867 | |
| 5868 | Args: |
| 5869 | clean_lines: A CleansedLines instance containing the file. |
| 5870 | linenum: The number of the line to check. |
| 5871 | |
| 5872 | Returns: |
| 5873 | True if the line at 'linenum' is inside something that expects arguments |
| 5874 | of function types. |
| 5875 | """ |
| 5876 | line = clean_lines.elided[linenum] |
| 5877 | return (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or |
| 5878 | (linenum >= 2 and |
| 5879 | (Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$', |
| 5880 | clean_lines.elided[linenum - 1]) or |
| 5881 | Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$', |
| 5882 | clean_lines.elided[linenum - 2]) or |
| 5883 | Search(r'\bstd::m?function\s*\<\s*$', |
| 5884 | clean_lines.elided[linenum - 1])))) |
| 5885 | |
| 5886 | |
| 5887 | _HEADERS_CONTAINING_TEMPLATES = ( |
no test coverage detected