parameters: (msg)
return_statement: return _GenericDiagnoser('WMM', 'Wrong MOCK_METHODn Macro',
                             [(gcc_regex, diagnosis),
                              (clang11_re, diagnosis % {'wrong_args': 'm',
                                                        'args': 'n'}),
                              (clang_regex, diagnosis)],
                             msg)
docstring: Diagnoses the WMM disease, given the error messages by the compiler.
docstring_summary: Diagnoses the WMM disease, given the error messages by the compiler.
docstring_tokens: Diagnoses the WMM disease given the error messages by the compiler .
function: def _WrongMockMethodMacroDiagnoser(msg):
    """Diagnoses the WMM disease, given the error messages by the compiler."""
  
    gcc_regex = (_GCC_FILE_LINE_RE +
                 r'.*this_method_does_not_take_(?P<wrong_args>\d+)_argument.*\n'
                 r'.*\n'
                 r'.*candidates are.*FunctionMocker<[^>]+A(?P<args>\d+)\)>')
    clang_regex = (_CLANG_NON_GMOCK_FILE_LINE_RE +
                   r'error:.*array.*negative.*r?\n'
                   r'(.*\n)*?'
                   r'(?P=file):(?P=line):(?P=column): error: too few arguments '
                   r'to function call, expected (?P<args>\d+), '
                   r'have (?P<wrong_args>\d+)')
    clang11_re = (_CLANG_NON_GMOCK_FILE_LINE_RE +
                  r'.*this_method_does_not_take_'
                  r'(?P<wrong_args>\d+)_argument.*')
    diagnosis = """
  You are using MOCK_METHOD%(wrong_args)s to define a mock method that has
  %(args)s arguments. Use MOCK_METHOD%(args)s (or MOCK_CONST_METHOD%(args)s,
  MOCK_METHOD%(args)s_T, MOCK_CONST_METHOD%(args)s_T as appropriate) instead."""
    return _GenericDiagnoser('WMM', 'Wrong MOCK_METHODn Macro',
                             [(gcc_regex, diagnosis),
                              (clang11_re, diagnosis % {'wrong_args': 'm',
                                                        'args': 'n'}),
                              (clang_regex, diagnosis)],
                             msg)
function_tokens: def _WrongMockMethodMacroDiagnoser ( msg ) : gcc_regex = ( _GCC_FILE_LINE_RE + r'.*this_method_does_not_take_(?P<wrong_args>\d+)_argument.*\n' r'.*\n' r'.*candidates are.*FunctionMocker<[^>]+A(?P<args>\d+)\)>' ) clang_regex = ( _CLANG_NON_GMOCK_FILE_LINE_RE + r'error:.*array.*negative.*r?\n' r'(.*\n)*?' r'(?P=file):(?P=line):(?P=column): error: too few arguments ' r'to function call, expected (?P<args>\d+), ' r'have (?P<wrong_args>\d+)' ) clang11_re = ( _CLANG_NON_GMOCK_FILE_LINE_RE + r'.*this_method_does_not_take_' r'(?P<wrong_args>\d+)_argument.*' ) diagnosis = """
  You are using MOCK_METHOD%(wrong_args)s to define a mock method that has
  %(args)s arguments. Use MOCK_METHOD%(args)s (or MOCK_CONST_METHOD%(args)s,
  MOCK_METHOD%(args)s_T, MOCK_CONST_METHOD%(args)s_T as appropriate) instead.""" return _GenericDiagnoser ( 'WMM' , 'Wrong MOCK_METHODn Macro' , [ ( gcc_regex , diagnosis ) , ( clang11_re , diagnosis % { 'wrong_args' : 'm' , 'args' : 'n' } ) , ( clang_regex , diagnosis ) ] , msg )