data: template argument handling

* storing template argument relations for cases where at lease one of these (template class, template argument) is defined inside the parsed project files.
* prevented storage from saving the same source location multiple times.
This commit is contained in:
malte_langkabel
2015-11-17 18:09:20 +01:00
parent 88b94a21d0
commit 901fa1a387
8 changed files with 92 additions and 37 deletions
+11 -2
View File
@@ -1356,10 +1356,19 @@ int Storage::addSourceLocation(int elementNodeId, const ParseLocation& location,
return 0;
}
int locationId = m_sqliteStorage.addSourceLocation(
int locationId = m_sqliteStorage.getSourceLocationByData(
elementNodeId, fileNodeId, location.startLineNumber, location.startColumnNumber,
location.endLineNumber, location.endColumnNumber, isScope
);
).id;
if (locationId == 0)
{
locationId = m_sqliteStorage.addSourceLocation(
elementNodeId, fileNodeId, location.startLineNumber, location.startColumnNumber,
location.endLineNumber, location.endColumnNumber, isScope
);
}
return locationId;
}
}