Merge remote-tracking branch 'origin/4.8'

Conflicts:
	tests/unit/unittest/unittest.pro

Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
This commit is contained in:
Eike Ziller
2018-11-09 13:30:40 +01:00
153 changed files with 3881 additions and 2057 deletions

View File

@@ -40,7 +40,7 @@ public:
{}
Database &database;
ReadStatement selectLocationsForSymbolLocation{
"SELECT directoryId, sourceId, line, column FROM locations JOIN sources USING(sourceId) WHERE symbolId = "
"SELECT sourceId, line, column FROM locations WHERE symbolId = "
" (SELECT symbolId FROM locations WHERE sourceId=? AND line=? AND column=?) "
"ORDER BY sourceId, line, column",
database};
@@ -59,7 +59,7 @@ public:
"SELECT symbolId, symbolName, signature FROM symbols WHERE symbolKind IN (?,?,?) AND symbolName LIKE ?",
database};
ReadStatement selectLocationOfSymbol{
"SELECT (SELECT directoryId FROM sources WHERE sourceId = l.sourceId), sourceId, line, column FROM locations AS l WHERE symbolId = ? AND locationKind = ?",
"SELECT sourceId, line, column FROM locations AS l WHERE symbolId = ? AND locationKind = ?",
database};
};

View File

@@ -45,8 +45,8 @@ public:
SourceLocation(ClangBackEnd::FilePathId filePathId, int line, int column)
: filePathId{filePathId}, lineColumn{line, column}
{}
SourceLocation(int directoryId, int sourceId, int line, int column)
: filePathId{directoryId, sourceId}, lineColumn{line, column}
SourceLocation(int sourceId, int line, int column)
: filePathId{sourceId}, lineColumn{line, column}
{}
friend bool operator==(SourceLocation first, SourceLocation second)

View File

@@ -55,7 +55,7 @@ public:
const std::size_t reserveSize = 128;
return locationsStatement.template values<SourceLocation, 4>(reserveSize,
return locationsStatement.template values<SourceLocation, 3>(reserveSize,
filePathId.filePathId,
line,
utf8Column);
@@ -120,7 +120,7 @@ public:
{
ReadStatement &statement = m_statementFactory.selectLocationOfSymbol;
return statement.template value<SourceLocation, 4>(symbolId, int(kind));
return statement.template value<SourceLocation, 3>(symbolId, int(kind));
}
private:
StatementFactory &m_statementFactory;