parameters: (files_to_process, flags)
return_statement: return FixManyFiles(sort_only_iwyu_records, flags)
docstring: For each file in files_to_process, sort its #includes.
  
    This reads each input file, sorts the #include lines, and replaces
    the input file with the result. SortIncludesInFiles does not add
    or remove any #includes.  It also ignores forward-declares.
  
    Arguments:
      files_to_process: a list (or set) of filenames.
      flags: commandline flags, as parsed by optparse.  We do not use
         any flags directly, but pass them to other routines.
  
    Returns:
      The number of files that had to be modified (because they weren't
      already all correct, that is, already in sorted order).
docstring_summary: For each file in files_to_process, sort its #includes.
docstring_tokens: For each file in files_to_process sort its #includes .
function: def SortIncludesInFiles(files_to_process, flags):
    """For each file in files_to_process, sort its #includes.
  
    This reads each input file, sorts the #include lines, and replaces
    the input file with the result. SortIncludesInFiles does not add
    or remove any #includes.  It also ignores forward-declares.
  
    Arguments:
      files_to_process: a list (or set) of filenames.
      flags: commandline flags, as parsed by optparse.  We do not use
         any flags directly, but pass them to other routines.
  
    Returns:
      The number of files that had to be modified (because they weren't
      already all correct, that is, already in sorted order).
    """
    sort_only_iwyu_records = []
    for filename in files_to_process:
      filename = NormalizeFilePath(flags.basedir, filename)
      # An empty iwyu record has no adds or deletes, so its only effect
      # is to cause us to sort the #include lines.  (Since fix_includes
      # gets all its knowledge of where forward-declare lines are from
      # the iwyu input, with an empty iwyu record it just ignores all
      # the forward-declare lines entirely.)
      sort_only_iwyu_records.append(IWYUOutputRecord(filename))
    return FixManyFiles(sort_only_iwyu_records, flags)
function_tokens: def SortIncludesInFiles ( files_to_process , flags ) : sort_only_iwyu_records = [ ] for filename in files_to_process : filename = NormalizeFilePath ( flags . basedir , filename ) # An empty iwyu record has no adds or deletes, so its only effect # is to cause us to sort the #include lines.  (Since fix_includes # gets all its knowledge of where forward-declare lines are from # the iwyu input, with an empty iwyu record it just ignores all # the forward-declare lines entirely.) sort_only_iwyu_records . append ( IWYUOutputRecord ( filename ) ) return FixManyFiles ( sort_only_iwyu_records , flags )