tools/clang/pylib/clang/compile_db.py
def ProcessCompileDatabase(compile_db, filtered_args, target_os=None):
  """Make the compile db generated by ninja more clang-tool friendly.

  Args:
    compile_db: The compile database parsed as a Python dictionary.

  Returns:
    A postprocessed compile db that clang tooling can use.
  """
  compile_db = [_ProcessEntry(e, filtered_args, target_os) for e in compile_db]

  if not _IsTargettingWindows(target_os):
    return compile_db

  if _debugging:
    print('Read in %d entries from the compile db' % len(compile_db))
  original_length = len(compile_db)

  # Filter out NaCl stuff. The clang tooling chokes on them.
  # TODO(dcheng): This doesn't appear to do anything anymore, remove?
  compile_db = [
      e for e in compile_db if '_nacl.cc.pdb' not in e['command']
      and '_nacl_win64.cc.pdb' not in e['command']
  ]
  if _debugging:
    print('Filtered out %d entries...' % (original_length - len(compile_db)))

  # TODO(dcheng): Also filter out multiple commands for the same file. Not sure
  # how that happens, but apparently it's an issue on Windows.
  return compile_db
Make the compile db generated by ninja more clang-tool friendly.

  Args:
    compile_db: The compile database parsed as a Python dictionary.

  Returns:
    A postprocessed compile db that clang tooling can use.
  
Make the compile db generated by ninja more clang-tool friendly.
Make the compile db generated by ninja more clang - tool friendly .
def ProcessCompileDatabase(compile_db, filtered_args, target_os=None):
  compile_db = [_ProcessEntry(e, filtered_args, target_os) for e in compile_db]
  if not _IsTargettingWindows(target_os):
    return compile_db
  if _debugging:
    print('Read in %d entries from the compile db' % len(compile_db))
  original_length = len(compile_db)
  compile_db = [
      e for e in compile_db if '_nacl.cc.pdb' not in e['command']
      and '_nacl_win64.cc.pdb' not in e['command']
  ]
  if _debugging:
    print('Filtered out %d entries...' % (original_length - len(compile_db)))
  return compile_db
def ProcessCompileDatabase ( compile_db , filtered_args , target_os = None ) : compile_db = [ _ProcessEntry ( e , filtered_args , target_os ) for e in compile_db ] if not _IsTargettingWindows ( target_os ) : return compile_db if _debugging : print ( 'Read in %d entries from the compile db' % len ( compile_db ) ) original_length = len ( compile_db ) compile_db = [ e for e in compile_db if '_nacl.cc.pdb' not in e [ 'command' ] and '_nacl_win64.cc.pdb' not in e [ 'command' ] ] if _debugging : print ( 'Filtered out %d entries...' % ( original_length - len ( compile_db ) ) ) return compile_db
Make the compile db generated by ninja more clang-tool friendly.
Make the compile db generated by ninja more clang - tool friendly .
"""Make the compile db generated by ninja more clang-tool friendly.

  Args:
    compile_db: The compile database parsed as a Python dictionary.

  Returns:
    A postprocessed compile db that clang tooling can use.
  """ # Filter out NaCl stuff. The clang tooling chokes on them. # TODO(dcheng): This doesn't appear to do anything anymore, remove? # TODO(dcheng): Also filter out multiple commands for the same file. Not sure # how that happens, but apparently it's an issue on Windows.
A postprocessed compile db that clang tooling can use.
A postprocessed compile db that clang tooling can use .
compile_db
The compile database parsed as a Python dictionary.
The compile database parsed as a Python dictionary .
filtered_args
target_os