Esempio n. 1
0
def get_comp_args(target_file: str,
                  compdb: cindex.CompilationDatabase) -> Iterator[str]:
    result = list()

    for db_cmd in compdb.getCompileCommands(target_file):
        result.extend(db_cmd.arguments)

    # Remove compiler.
    result = result[1:]

    # Remove filename itself.
    result = result[:len(result) - 1]

    # Parse all comments. Clang, by default, parses only doxygen.
    result.append("-fparse-all-comments")
    return result