data: Extended CxxParser to detect elements

Detects most elements in the code, currently classes, structs, global variables, fields, functions, methods, namespaces
and enums. The structs ParseLocation and ParseVariable are helper objects to transmit information to the ParserClient.
Currently the parsed information only gets logged in the Storage.

review id = 15

fortune cookie message = In dreams and in life, nothing is impossible.
This commit is contained in:
Eberhard Graether
2014-05-19 12:51:00 +02:00
parent bb6640369a
commit 38c8aaebe8
15 changed files with 738 additions and 68 deletions
+4 -2
View File
@@ -14,8 +14,10 @@ CxxParser::~CxxParser()
void CxxParser::parseFiles(const std::vector<std::string>& filePaths)
{
const char* argv[] = { "app", "--" };
int argc = 2;
// Fake commandline flags passed to the programm. Everything after '--' will be interpreted by the ClangTool.
// The option '-x c++' treats subsequent input files as C++.
const char* argv[] = { "app", "--", "-x", "c++" };
int argc = 4;
std::shared_ptr<clang::tooling::FixedCompilationDatabase> compilationDatabase(
clang::tooling::FixedCompilationDatabase::loadFromCommandLine(argc, argv)