Files
Sourcetrail/src/lib_cxx/data/parser/cxx/ASTActionFactory.cpp
T
Andreas Stallinger 37ead804bf src: clazy compiler warnings
get rid of most clazy warnings (https://github.com/KDE/clazy)
* range loop use refs
* qcolor ctor with ints
* missing Q_OBJECT macro
* use .constfirst instead of .first

enabled ccache for unix systems for fasterr recompiling
* if ccache is in path we use it now
2017-08-10 09:45:55 +02:00

31 lines
815 B
C++

#include "data/parser/cxx/ASTActionFactory.h"
#include "clang/Frontend/FrontendActions.h"
#include "data/parser/cxx/ASTAction.h"
ASTActionFactory::ASTActionFactory(
std::shared_ptr<ParserClient> client,
std::shared_ptr<FileRegister> fileRegister,
std::shared_ptr<FilePathCache> canonicalFilePathCache,
bool preprocessorOnly
)
: m_client(client)
, m_fileRegister(fileRegister)
, m_canonicalFilePathCache(canonicalFilePathCache)
, m_preprocessorOnly(preprocessorOnly)
{
}
ASTActionFactory::~ASTActionFactory()
{
}
clang::FrontendAction* ASTActionFactory::create()
{
if (m_preprocessorOnly)
{
return new ASTAction<clang::PreprocessOnlyAction>(m_client, m_fileRegister, m_canonicalFilePathCache);
}
return new ASTAction<clang::ASTFrontendAction>(m_client, m_fileRegister, m_canonicalFilePathCache);
}