parameters: (out_dir, build_target)
return_statement: return None
docstring: Returns the Clang command line for building |build_target|
  
    Asks ninja for the list of commands used to build |filename| and returns the
    final Clang invocation.
  
    Args:
      out_dir: (String) Absolute path to ninja build output directory.
      build_target: (String) A build target understood by ninja
  
    Returns:
      (String or None) Clang command line or None if a Clang command line couldn't
          be determined.
docstring_summary: Returns the Clang command line for building |build_target|
docstring_tokens: Returns the Clang command line for building |build_target|
function: def GetClangCommandLineForNinjaOutput(out_dir, build_target):
    """Returns the Clang command line for building |build_target|
  
    Asks ninja for the list of commands used to build |filename| and returns the
    final Clang invocation.
  
    Args:
      out_dir: (String) Absolute path to ninja build output directory.
      build_target: (String) A build target understood by ninja
  
    Returns:
      (String or None) Clang command line or None if a Clang command line couldn't
          be determined.
    """
    p = subprocess.Popen(['ninja', '-v', '-C', out_dir,
                          '-t', 'commands', build_target],
                         stdout=subprocess.PIPE, universal_newlines=True)
    stdout, stderr = p.communicate()
    if p.returncode != 0:
      return None
  
    # Ninja will return multiple build steps for all dependencies up to
    # |build_target|. The build step we want is the last Clang invocation, which
    # is expected to be the one that outputs |build_target|.
    for line in reversed(stdout.split('\n')):
      if 'clang' in line:
        return line
    return None
function_tokens: def GetClangCommandLineForNinjaOutput ( out_dir , build_target ) : p = subprocess . Popen ( [ 'ninja' , '-v' , '-C' , out_dir , '-t' , 'commands' , build_target ] , stdout = subprocess . PIPE , universal_newlines = True ) stdout , stderr = p . communicate ( ) if p . returncode != 0 : return None # Ninja will return multiple build steps for all dependencies up to # |build_target|. The build step we want is the last Clang invocation, which # is expected to be the one that outputs |build_target|. for line in reversed ( stdout . split ( '\n' ) ) : if 'clang' in line : return line return None