INNER CODE UNIT · Python

clang_regex1

hongliuliao/ehttp · deps/googletest/googlemock/scripts/gmock_doctor.py:197

  clang_regex1 = (_CLANG_FILE_LINE_RE +
                  r'error: cannot initialize return object '
                  r'of type \'Result\' \(aka \'(?P<return_type>.*)\'\) '
                  r'with an rvalue of type \'void\'')
  clang_regex2 = (_CLANG_FILE_LINE_RE +
                  r'error: cannot initialize return object '
                  r'of type \'(?P<return_type>.*)\' '
                  r'with an rvalue of type \'void\'')
  diagnosis = """
You are using an action that returns void, but it needs to return
%(return_type)s.  Please tell it *what* to return.  Perhaps you can use
the pattern DoAll(some_action, Return(some_value))?"""
  return _GenericDiagnoser(
      'NRS',
      'Need to Return Something',
      [(gcc_regex, diagnosis % {'return_type': '*something*'}),
       (clang_regex1, diagnosis),
       (clang_regex2, diagnosis)],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…