We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2baef1c commit 52f7795Copy full SHA for 52f7795
src/clu/custom_compilation_database.cpp
@@ -0,0 +1,18 @@
1
+#include "custom_compilation_database.hpp"
2
+
3
+namespace clu {
4
5
+ std::vector<clang::tooling::CompileCommand> custom_compilation_database::getCompileCommands(llvm::StringRef FilePath) const {
6
+ std::vector<clang::tooling::CompileCommand> result;
7
+ for (const auto &C : Commands)
8
+ if (C.Filename == FilePath) result.push_back(C);
9
+ return result;
10
+ }
11
12
+ std::vector<std::string> custom_compilation_database::getAllFiles() const {
13
+ std::vector<std::string> files;
14
+ for (const auto &C : Commands) files.push_back(C.Filename);
15
+ return files;
16
17
18
+} // namespace clu
0 commit comments