src: removed last unused references to PreprocessorOnlyAction

This commit is contained in:
mlangkabel
2017-11-27 16:23:44 +01:00
parent adf8c3e5fc
commit a5c4287e53
3 changed files with 4 additions and 13 deletions
@@ -6,13 +6,11 @@
ASTActionFactory::ASTActionFactory(
std::shared_ptr<ParserClient> client,
std::shared_ptr<FileRegister> fileRegister,
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache,
bool preprocessorOnly
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache
)
: m_client(client)
, m_fileRegister(fileRegister)
, m_canonicalFilePathCache(canonicalFilePathCache)
, m_preprocessorOnly(preprocessorOnly)
{
}
@@ -22,9 +20,5 @@ 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);
}
@@ -15,8 +15,7 @@ public:
explicit ASTActionFactory(
std::shared_ptr<ParserClient> client,
std::shared_ptr<FileRegister> fileRegister,
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache,
bool preprocessorOnly
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache
);
virtual ~ASTActionFactory();
@@ -27,8 +26,6 @@ private:
std::shared_ptr<ParserClient> m_client;
std::shared_ptr<FileRegister> m_fileRegister;
std::shared_ptr<CanonicalFilePathCache> m_canonicalFilePathCache;
bool m_preprocessorOnly;
};
#endif // AST_ACTION_FACTORY
+2 -2
View File
@@ -95,7 +95,7 @@ void CxxParser::buildIndex(const std::string& fileName, std::shared_ptr<TextAcce
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache = std::make_shared<CanonicalFilePathCache>();
std::shared_ptr<CxxDiagnosticConsumer> diagnostics = getDiagnostics(canonicalFilePathCache, false);
ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, false);
ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache);
std::vector<std::string> args = getCommandlineArgumentsEssential(std::vector<std::string>(1, "-std=c++1z"), std::vector<FilePath>(), std::vector<FilePath>());
@@ -129,7 +129,7 @@ void CxxParser::runTool(clang::tooling::CompilationDatabase* compilationDatabase
tool.setDiagnosticConsumer(diagnostics.get());
ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, false);
ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache);
tool.run(&actionFactory);
}