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
+13
View File
@@ -603,6 +603,19 @@ NameHierarchy SqliteStorage::getNameHierarchyById(const Id id) const
return nameHierarchy;
}
StorageSourceLocation SqliteStorage::getSourceLocationByData(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, bool isScope) const
{
return getFirstSourceLocation((
"SELECT * FROM source_location WHERE element_id == " + std::to_string(elementId)
+ " AND file_node_id == " + std::to_string(fileNodeId)
+ " AND start_line == " + std::to_string(startLine)
+ " AND start_column == " + std::to_string(startCol)
+ " AND end_line == " + std::to_string(endLine)
+ " AND end_column == " + std::to_string(endCol)
+ " AND is_scope == " + std::to_string(isScope) + ";"
).c_str());
}
StorageSourceLocation SqliteStorage::getSourceLocationById(const Id id) const
{
return getFirstSourceLocation(