From a5c4287e5381a090b1f49158ddef67ef6ed8dd86 Mon Sep 17 00:00:00 2001 From: mlangkabel Date: Mon, 27 Nov 2017 16:23:44 +0100 Subject: [PATCH] src: removed last unused references to PreprocessorOnlyAction --- src/lib_cxx/data/parser/cxx/ASTActionFactory.cpp | 8 +------- src/lib_cxx/data/parser/cxx/ASTActionFactory.h | 5 +---- src/lib_cxx/data/parser/cxx/CxxParser.cpp | 4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib_cxx/data/parser/cxx/ASTActionFactory.cpp b/src/lib_cxx/data/parser/cxx/ASTActionFactory.cpp index 2c14e5cf..459521d7 100644 --- a/src/lib_cxx/data/parser/cxx/ASTActionFactory.cpp +++ b/src/lib_cxx/data/parser/cxx/ASTActionFactory.cpp @@ -6,13 +6,11 @@ ASTActionFactory::ASTActionFactory( std::shared_ptr client, std::shared_ptr fileRegister, - std::shared_ptr canonicalFilePathCache, - bool preprocessorOnly + std::shared_ptr 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(m_client, m_fileRegister, m_canonicalFilePathCache); - } return new ASTAction(m_client, m_fileRegister, m_canonicalFilePathCache); } diff --git a/src/lib_cxx/data/parser/cxx/ASTActionFactory.h b/src/lib_cxx/data/parser/cxx/ASTActionFactory.h index e08b046a..b52934aa 100644 --- a/src/lib_cxx/data/parser/cxx/ASTActionFactory.h +++ b/src/lib_cxx/data/parser/cxx/ASTActionFactory.h @@ -15,8 +15,7 @@ public: explicit ASTActionFactory( std::shared_ptr client, std::shared_ptr fileRegister, - std::shared_ptr canonicalFilePathCache, - bool preprocessorOnly + std::shared_ptr canonicalFilePathCache ); virtual ~ASTActionFactory(); @@ -27,8 +26,6 @@ private: std::shared_ptr m_client; std::shared_ptr m_fileRegister; std::shared_ptr m_canonicalFilePathCache; - - bool m_preprocessorOnly; }; #endif // AST_ACTION_FACTORY diff --git a/src/lib_cxx/data/parser/cxx/CxxParser.cpp b/src/lib_cxx/data/parser/cxx/CxxParser.cpp index f002d4b2..e88c865a 100644 --- a/src/lib_cxx/data/parser/cxx/CxxParser.cpp +++ b/src/lib_cxx/data/parser/cxx/CxxParser.cpp @@ -95,7 +95,7 @@ void CxxParser::buildIndex(const std::string& fileName, std::shared_ptr canonicalFilePathCache = std::make_shared(); std::shared_ptr diagnostics = getDiagnostics(canonicalFilePathCache, false); - ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, false); + ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache); std::vector args = getCommandlineArgumentsEssential(std::vector(1, "-std=c++1z"), std::vector(), std::vector()); @@ -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); }