ccls/tests/outline/outline2.cc

73 lines
1.9 KiB
C++
Raw Normal View History

2017-03-11 02:24:09 +00:00
#pragma once
#include <string>
#include <vector>
struct CompilationEntry {
std::string directory;
std::string filename;
std::vector<std::string> args;
};
std::vector<CompilationEntry> LoadCompilationEntriesFromDirectory(const std::string& project_directory);
/*
OUTPUT:
{
"types": [{
"id": 0,
"usr": "c:@S@CompilationEntry",
"short_name": "CompilationEntry",
"qualified_name": "CompilationEntry",
2017-04-05 08:06:18 +00:00
"definition": "6:8",
2017-03-11 02:24:09 +00:00
"vars": [0, 1, 2],
2017-04-05 08:06:18 +00:00
"uses": ["*6:8", "*12:13"]
2017-04-03 01:34:15 +00:00
}, {
"id": 1,
"usr": "c:@N@std@T@string",
"instantiations": [0, 1],
2017-04-05 08:06:18 +00:00
"uses": ["*7:8", "*8:8", "*9:20"]
2017-04-03 01:34:15 +00:00
}, {
"id": 2,
"usr": "c:@N@std@ST>2#T#T@vector",
"instantiations": [2],
2017-04-05 08:06:18 +00:00
"uses": ["*9:8", "*12:6"]
2017-03-11 02:24:09 +00:00
}],
"funcs": [{
"id": 0,
"usr": "c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@S@basic_string>#C#$@N@std@S@char_traits>#C#$@N@std@S@allocator>#C#",
"short_name": "LoadCompilationEntriesFromDirectory",
"qualified_name": "LoadCompilationEntriesFromDirectory",
2017-04-05 08:06:18 +00:00
"declarations": ["12:31"],
"uses": ["12:31"]
2017-03-11 02:24:09 +00:00
}],
"vars": [{
"id": 0,
"usr": "c:@S@CompilationEntry@FI@directory",
"short_name": "directory",
"qualified_name": "CompilationEntry::directory",
2017-04-05 08:06:18 +00:00
"definition": "7:15",
2017-03-11 02:24:09 +00:00
"variable_type": 1,
"declaring_type": 0,
2017-04-05 08:06:18 +00:00
"uses": ["7:15"]
2017-03-11 02:24:09 +00:00
}, {
"id": 1,
"usr": "c:@S@CompilationEntry@FI@filename",
"short_name": "filename",
"qualified_name": "CompilationEntry::filename",
2017-04-05 08:06:18 +00:00
"definition": "8:15",
2017-03-11 02:24:09 +00:00
"variable_type": 1,
"declaring_type": 0,
2017-04-05 08:06:18 +00:00
"uses": ["8:15"]
2017-03-11 02:24:09 +00:00
}, {
"id": 2,
"usr": "c:@S@CompilationEntry@FI@args",
"short_name": "args",
"qualified_name": "CompilationEntry::args",
2017-04-05 08:06:18 +00:00
"definition": "9:28",
2017-03-11 02:24:09 +00:00
"variable_type": 2,
"declaring_type": 0,
2017-04-05 08:06:18 +00:00
"uses": ["9:28"]
2017-03-11 02:24:09 +00:00
}]
}
*/