logic: cxx indexer fixes

* fixed comment locations have been saved to wrong database table
* fixed usage of tryGetRealPathName on windows
* used real filename in PreprocessorCallbacks, DiagnosticsConsumer and CommentHandler
* fixed crash in IncludeValidation when only one source file was checked
This commit is contained in:
malte_langkabel
2017-08-09 10:59:47 +02:00
parent 42fc52b8f7
commit 1ac63f0158
7 changed files with 85 additions and 46 deletions
@@ -1027,7 +1027,7 @@ void SqliteIndexStorage::setupPrecompiledStatements()
"LIMIT 1;"
);
m_insertCommentLocationStmt = m_database.compileStatement(
"INSERT INTO source_location(id, file_node_id, start_line, start_column, end_line, end_column) VALUES(NULL, ?, ?, ?, ?, ?);"
"INSERT INTO comment_location(id, file_node_id, start_line, start_column, end_line, end_column) VALUES(NULL, ?, ?, ?, ?, ?);"
);
m_checkErrorExistsStmt = m_database.compileStatement(
"SELECT id FROM error WHERE "