data: parsing and saving inheritance

This change parses inheritance in CxxParser and saves them as EDGE_INHERITANCE in the Storage's graph. Tests for correct
inheritance recognition were added to CxxParserTestSuite.

fortune cookie message = If you continually give, you will continually have.
This commit is contained in:
Eberhard Graether
2014-07-07 13:12:01 +02:00
parent c02767362f
commit addd86288f
9 changed files with 138 additions and 17 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ public:
// }
virtual bool VisitTypedefDecl(const clang::TypedefDecl* declaration); // typedefs
virtual bool VisitCXXRecordDecl(clang::CXXRecordDecl* declaration); // classes and structs
virtual bool VisitCXXRecordDecl(clang::CXXRecordDecl* declaration); // structs, classes and inheritance
virtual bool VisitVarDecl(clang::VarDecl* declaration); // global variables and static fields
virtual bool VisitFieldDecl(clang::FieldDecl* declaration); // fields
virtual bool VisitFunctionDecl(clang::FunctionDecl* declaration); // functions
@@ -34,7 +34,7 @@ public:
private:
bool hasValidLocation(const clang::Decl* declaration) const;
ParseLocation getParseLocation(const clang::Decl* declaration) const;
ParseLocation getParseLocation(const clang::SourceRange& sourceRange) const;
ParseVariable getParseVariable(clang::ValueDecl* declaration) const;
std::vector<ParseVariable> getParameters(clang::FunctionDecl* declaration) const;
std::string getTypeName(const clang::QualType& type) const;