data: Parsing type usages within function and method bodies

This change parses type usages in function and method bodies and saves them with an edge of type EDGE_TYPE_USAGE. This
also includes base class types used in initialization lists of derived class constructors.
This commit is contained in:
Eberhard Graether
2014-07-30 22:35:30 +02:00
parent dc09860680
commit 890575cd90
14 changed files with 190 additions and 23 deletions
+15 -8
View File
@@ -14,9 +14,9 @@ void funk();
class A
{
public:
A()
A(char c)
: m_importantValue(42)
, m_importanterValue('r')
, m_importanterValue(c)
, m_importantestValue(3.14159265359f)
{
}
@@ -27,14 +27,14 @@ public:
void doImportantStuff()
{
m_importantValue *= 1;
int a = 1;
m_importantValue *= a;
}
void doModeratelyImportantStuff()
{
m_importanterValue = 'R';
sum(21, 21);
int answer = sum(21, 21);
}
private:
@@ -43,9 +43,16 @@ private:
float m_importantestValue;
};
A globalA;
A globalA(' ');
class B : public A {};
class B : public A
{
public:
B()
: A('b')
{
}
};
class C
{
@@ -62,7 +69,7 @@ public:
void solveAllProblems()
{
A aInstance;
A aInstance('a');
aInstance.doImportantStuff();
aInstance.doModeratelyImportantStuff();
}
+2 -2
View File
@@ -7,7 +7,7 @@ int diff(int a, int b);
int main()
{
A aInstance;
A aInstance('m');
aInstance.doImportantStuff();
int a = sum(1, 2);
@@ -39,6 +39,6 @@ int diff(int a, int b)
void funk()
{
A aInstance;
A aInstance('x');
aInstance.doModeratelyImportantStuff();
}
@@ -1,6 +1,10 @@
typedef unsigned int uint;
class G
{};
class H
: public G
{
private:
int width;