parameters: (filename, clean_lines, linenum, nesting_state, error)
docstring: Check for rvalue references.
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      nesting_state: A NestingState instance which maintains information about
                     the current stack of nested blocks being parsed.
      error: The function to call with any errors found.
docstring_summary: Check for rvalue references.
docstring_tokens: Check for rvalue references .
function: def CheckRValueReference(filename, clean_lines, linenum, nesting_state, error):
    """Check for rvalue references.
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      nesting_state: A NestingState instance which maintains information about
                     the current stack of nested blocks being parsed.
      error: The function to call with any errors found.
    """
    # Find lines missing spaces around &&.
    # TODO(unknown): currently we don't check for rvalue references
    # with spaces surrounding the && to avoid false positives with
    # boolean expressions.
    line = clean_lines.elided[linenum]
    match = Match(r'^(.*\S)&&', line)
    if not match:
      match = Match(r'(.*)&&\S', line)
    if (not match) or '(&&)' in line or Search(r'\boperator\s*$', match.group(1)):
      return
  
    # Either poorly formed && or an rvalue reference, check the context
    # to get a more accurate error message.  Mostly we want to determine
    # if what's to the left of "&&" is a type or not.
    typenames = GetTemplateArgs(clean_lines, linenum)
    and_pos = len(match.group(1))
    if IsRValueType(typenames, clean_lines, nesting_state, linenum, and_pos):
      if not IsRValueAllowed(clean_lines, linenum, typenames):
        error(filename, linenum, 'build/c++11', 3,
              'RValue references are an unapproved C++ feature.')
    else:
      error(filename, linenum, 'whitespace/operators', 3,
            'Missing spaces around &&')
function_tokens: def CheckRValueReference ( filename , clean_lines , linenum , nesting_state , error ) : # Find lines missing spaces around &&. # TODO(unknown): currently we don't check for rvalue references # with spaces surrounding the && to avoid false positives with # boolean expressions. line = clean_lines . elided [ linenum ] match = Match ( r'^(.*\S)&&' , line ) if not match : match = Match ( r'(.*)&&\S' , line ) if ( not match ) or '(&&)' in line or Search ( r'\boperator\s*$' , match . group ( 1 ) ) : return # Either poorly formed && or an rvalue reference, check the context # to get a more accurate error message.  Mostly we want to determine # if what's to the left of "&&" is a type or not. typenames = GetTemplateArgs ( clean_lines , linenum ) and_pos = len ( match . group ( 1 ) ) if IsRValueType ( typenames , clean_lines , nesting_state , linenum , and_pos ) : if not IsRValueAllowed ( clean_lines , linenum , typenames ) : error ( filename , linenum , 'build/c++11' , 3 , 'RValue references are an unapproved C++ feature.' ) else : error ( filename , linenum , 'whitespace/operators' , 3 , 'Missing spaces around &&' )