parameters: (filename)
return_statement: return {
      'flags': final_flags,
      'do_cache': should_cache_flags_for_file
    }
docstring: This is the main entry point for YCM. Its interface is fixed.
  
    Args:
      filename: (String) Path to source file being edited.
  
    Returns:
      (Dictionary)
        'flags': (List of Strings) Command line flags.
        'do_cache': (Boolean) True if the result should be cached.
docstring_summary: This is the main entry point for YCM. Its interface is fixed.
docstring_tokens: This is the main entry point for YCM . Its interface is fixed .
function: def FlagsForFile(filename):
    """This is the main entry point for YCM. Its interface is fixed.
  
    Args:
      filename: (String) Path to source file being edited.
  
    Returns:
      (Dictionary)
        'flags': (List of Strings) Command line flags.
        'do_cache': (Boolean) True if the result should be cached.
    """
    ext = os.path.splitext(filename)[1]
    abs_filename = os.path.abspath(filename)
    chrome_root = FindChromeSrcFromFilename(abs_filename)
    clang_flags = GetClangOptionsFromNinjaForFilename(chrome_root, abs_filename)
  
    # If clang_flags could not be determined, then assume that was due to a
    # transient failure. Preventing YCM from caching the flags allows us to try to
    # determine the flags again.
    should_cache_flags_for_file = bool(clang_flags)
  
    final_flags = _default_flags + _extension_flags.get(ext, []) + clang_flags
  
    return {
      'flags': final_flags,
      'do_cache': should_cache_flags_for_file
    }
function_tokens: def FlagsForFile ( filename ) : ext = os . path . splitext ( filename ) [ 1 ] abs_filename = os . path . abspath ( filename ) chrome_root = FindChromeSrcFromFilename ( abs_filename ) clang_flags = GetClangOptionsFromNinjaForFilename ( chrome_root , abs_filename ) # If clang_flags could not be determined, then assume that was due to a # transient failure. Preventing YCM from caching the flags allows us to try to # determine the flags again. should_cache_flags_for_file = bool ( clang_flags ) final_flags = _default_flags + _extension_flags . get ( ext , [ ] ) + clang_flags return { 'flags' : final_flags , 'do_cache' : should_cache_flags_for_file }