diff --git a/src/project.cc b/src/project.cc index 937ff8cd..fbade5ca 100644 --- a/src/project.cc +++ b/src/project.cc @@ -241,6 +241,11 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry( // This is most likely the file path we will be passing to clang. if (EndsWith(arg, base_name)) arg = cleanup_maybe_relative_path(arg); + // TODO Exclude .a .o to make link command in compile_commands.json work. + // Also, clang_parseTranslationUnit2FullArgv does not seem to accept + // multiple source filenames. + else if (EndsWith(arg, ".a") || EndsWith(arg, ".o")) + continue; } result.args.push_back(arg); diff --git a/src/query.cc b/src/query.cc index b81ed1aa..5b4f4f8f 100644 --- a/src/query.cc +++ b/src/query.cc @@ -357,11 +357,6 @@ Maybe GetQueryVarIdFromUsr(QueryDatabase* query_db, } // namespace -template <> -bool Maybe::has_value() const { - return storage.range.start.line >= 0; -} - Maybe QueryDatabase::GetQueryFileIdFromPath( const std::string& path) { return ::GetQueryFileIdFromPath(this, path, false);