def CheckRedundantOverrideOrFinal(filename, clean_lines, linenum, error):
 line = clean_lines.elided[linenum]
 declarator_end = line.rfind(')')
 if (declarator_end >= 0):
  fragment = line[declarator_end:]
 elif ((linenum > 1) and (clean_lines.elided[(linenum - 1)].rfind(')') >= 0)):
  fragment = line
 else:
  return
 if (Search('\\boverride\\b', fragment) and Search('\\bfinal\\b', fragment)):
  error(filename, linenum, 'readability/inheritance', 4, '"override" is redundant since function is already declared as "final"')

def CheckRedundantOverrideOrFinal ( filename , clean_lines , linenum , error ) : line = clean_lines . elided [ linenum ] declarator_end = line . rfind ( ')' ) if ( declarator_end >= 0 ) : fragment = line [ declarator_end : ] elif ( ( linenum > 1 ) and ( clean_lines . elided [ ( linenum - 1 ) ] . rfind ( ')' ) >= 0 ) ) : fragment = line else : return if ( Search ( '\\boverride\\b' , fragment ) and Search ( '\\bfinal\\b' , fragment ) ) : error ( filename , linenum , 'readability/inheritance' , 4 , '"override" is redundant since function is already declared as "final"' )
check if line contains a redundant "override" or "final" virt-specifier .