data: Option to run only C/C++ preprocessor when indexing (issue 297)
* Added as checkbox to indexing start dialog * Only shown for C/C++ projects * Files will be marked incomplete
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
#include "data/parser/cxx/ASTActionFactory.h"
|
||||
|
||||
ASTActionFactory::ASTActionFactory(std::shared_ptr<ParserClient> client, std::shared_ptr<FileRegister> fileRegister)
|
||||
#include "clang/Frontend/FrontendActions.h"
|
||||
|
||||
ASTActionFactory::ASTActionFactory(
|
||||
std::shared_ptr<ParserClient> client, std::shared_ptr<FileRegister> fileRegister, bool preprocessorOnly
|
||||
)
|
||||
: m_client(client)
|
||||
, m_fileRegister(fileRegister)
|
||||
, m_preprocessorOnly(preprocessorOnly)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -12,5 +17,12 @@ ASTActionFactory::~ASTActionFactory()
|
||||
|
||||
clang::FrontendAction* ASTActionFactory::create()
|
||||
{
|
||||
return new ASTAction(m_client, m_fileRegister);
|
||||
if (m_preprocessorOnly)
|
||||
{
|
||||
return new ASTAction<clang::PreprocessOnlyAction>(m_client, m_fileRegister);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ASTAction<clang::ASTFrontendAction>(m_client, m_fileRegister);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user