From ef0183c3719f8c42725bb3dc5d7a5f1787cbec24 Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 8 Jun 2015 12:46:53 +0200 Subject: [PATCH] Now also getting compile commands for header-files. --- src/CompileCommands.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CompileCommands.cc b/src/CompileCommands.cc index 2bcd88f..af9b64d 100644 --- a/src/CompileCommands.cc +++ b/src/CompileCommands.cc @@ -4,6 +4,8 @@ clang::CompileCommands:: CompileCommands(const std::string &filename, CompilationDatabase *db) { commands_ = clang_CompilationDatabase_getCompileCommands(db->db_, filename.c_str()); + if(clang_CompileCommands_getSize(commands_)==0) + commands_ = clang_CompilationDatabase_getAllCompileCommands(db->db_); } clang::CompileCommands::