data: Fixed files within precompiled header have no syntax highlighting
- removed working_copy from project setup tests
This commit is contained in:
@@ -67,6 +67,7 @@ void CxxAstVisitor::indexDecl(clang::Decl* d)
|
|||||||
{
|
{
|
||||||
LOG_INFO("starting AST traversal");
|
LOG_INFO("starting AST traversal");
|
||||||
|
|
||||||
|
// record files not handled in preprocessor callbacks, e.g. files within precompiled header
|
||||||
clang::SourceManager& sourceManager = m_astContext->getSourceManager();
|
clang::SourceManager& sourceManager = m_astContext->getSourceManager();
|
||||||
for (auto it = sourceManager.fileinfo_begin(); it != sourceManager.fileinfo_end(); it++)
|
for (auto it = sourceManager.fileinfo_begin(); it != sourceManager.fileinfo_end(); it++)
|
||||||
{
|
{
|
||||||
@@ -79,6 +80,7 @@ void CxxAstVisitor::indexDecl(clang::Decl* d)
|
|||||||
const FilePath filePath = m_canonicalFilePathCache->getCanonicalFilePath(fileEntry);
|
const FilePath filePath = m_canonicalFilePathCache->getCanonicalFilePath(fileEntry);
|
||||||
const bool pathIsProjectFile = m_canonicalFilePathCache->isProjectFile(fileId, sourceManager);
|
const bool pathIsProjectFile = m_canonicalFilePathCache->isProjectFile(fileId, sourceManager);
|
||||||
const Id symbolId = m_client->recordFile(filePath, pathIsProjectFile);
|
const Id symbolId = m_client->recordFile(filePath, pathIsProjectFile);
|
||||||
|
m_client->recordFileLanguage(symbolId, L"cpp");
|
||||||
m_canonicalFilePathCache->addFileSymbolId(fileId, filePath, symbolId);
|
m_canonicalFilePathCache->addFileSymbolId(fileId, filePath, symbolId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<config>
|
|
||||||
<source_groups>
|
|
||||||
<source_group_ffef4a06-185d-4b00-99b1-5c32b26cecf9>
|
|
||||||
<build_file_path>
|
|
||||||
<compilation_db_path>compile_commands.json</compilation_db_path>
|
|
||||||
</build_file_path>
|
|
||||||
<compiler_flags>
|
|
||||||
<compiler_flag>-DCOMPILER_FLAG</compiler_flag>
|
|
||||||
</compiler_flags>
|
|
||||||
<indexed_header_paths>
|
|
||||||
<indexed_header_path>src</indexed_header_path>
|
|
||||||
</indexed_header_paths>
|
|
||||||
<name>C/C++ from Compilation Database</name>
|
|
||||||
<pch_flags>
|
|
||||||
<pch_flag>-DPCH_FLAG</pch_flag>
|
|
||||||
<use_cdb_flags>1</use_cdb_flags>
|
|
||||||
<use_compiler_flags>1</use_compiler_flags>
|
|
||||||
</pch_flags>
|
|
||||||
<pch_input_file_path>src/pch.hpp</pch_input_file_path>
|
|
||||||
<status>enabled</status>
|
|
||||||
<type>C/C++ from Compilation Database</type>
|
|
||||||
</source_group_ffef4a06-185d-4b00-99b1-5c32b26cecf9>
|
|
||||||
</source_groups>
|
|
||||||
<version>8</version>
|
|
||||||
</config>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"directory": "/Users/ebsi/Documents/Coati/testing/project_setup/cxx_cdb_pch/working_copy",
|
|
||||||
"command": "clang-tool -fms-extensions -fms-compatibility -fms-compatibility-version=19 -isystem \"/Users/ebsi/Documents/Coati/testing/project_setup/cxx_cdb_pch/working_copy/src/include\" -DCDB_FLAG -D _DEBUG -D _MT -D _DLL -D WIN32 -D _WINDOWS -D BUILD_TYPE=\"\" -D QT_WIDGETS_LIB -D QT_GUI_LIB -D QT_CORE_LIB -D QT_NETWORK_LIB -D QT_WINEXTRAS_LIB -D QT_SVG_LIB -D CMAKE_INTDIR=\"Debug\" -D _MBCS -std=c++14 \"/Users/ebsi/Documents/Coati/testing/project_setup/cxx_cdb_pch/working_copy/src/main.cpp\"",
|
|
||||||
"file": "/Users/ebsi/Documents/Coati/testing/project_setup/cxx_cdb_pch/working_copy/src/main.cpp"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#ifndef FOO_H
|
|
||||||
#define FOO_H
|
|
||||||
|
|
||||||
#include "FooBar.h"
|
|
||||||
|
|
||||||
#ifndef COMPILER_FLAG
|
|
||||||
#error "COMPILER_FLAG not defined"
|
|
||||||
#else
|
|
||||||
|
|
||||||
class Bar : public FooBar
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif // FOO_H
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#ifndef BAR_H
|
|
||||||
#define BAR_H
|
|
||||||
|
|
||||||
#include "FooBar.h"
|
|
||||||
|
|
||||||
#ifndef CDB_FLAG
|
|
||||||
#error "CDB_FLAG not defined"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class Foo : public FooBar
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // FOO_BAR_H
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#ifndef FOO_BAR_H
|
|
||||||
#define FOO_BAR_H
|
|
||||||
|
|
||||||
class FooBar
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // FOO_BAR_H
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#include "pch.hpp"
|
|
||||||
|
|
||||||
void test()
|
|
||||||
{
|
|
||||||
Foo foo;
|
|
||||||
Bar bar;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
#ifndef PCH_FLAG
|
|
||||||
#error "PCH_FLAG not defined"
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include "Foo.h"
|
|
||||||
#include "Bar.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user