def CleanseComments(line):
commentpos = line.find('<STR_LIT>')<EOL>if commentpos != -<NUM_LIT:1> and not IsCppString(line[:commentpos]):<EOL><INDENT>line = line[:commentpos].rstrip()<EOL><DEDENT>return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('<STR_LIT>', line)<EOL>
Removes //-comments and single-line C-style /* */ comments.

    Args:
      line: A line of C++ source.

    Returns:
      The line with single-line comments removed.