diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index ad46f2651cd..fc1a51de645 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -993,9 +993,6 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string Preprocessor preprocessor(mSettings, mErrorLogger, file.lang()); - if (!preprocessor.loadFiles(tokens1, files)) - return mLogger->exitcode(); - if (!mSettings.plistOutput.empty()) { std::string filename2; if (file.spath().find('/') != std::string::npos) diff --git a/lib/path.cpp b/lib/path.cpp index 6770267cfda..2e9e7b6a439 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -230,7 +230,6 @@ bool Path::acceptFile(const std::string &path, const std::set &extr static bool hasEmacsCppMarker(const char* path) { // TODO: identify is called three times for each file - // Preprocessor::loadFiles() -> createDUI() // Preprocessor::preprocess() -> createDUI() // TokenList::createTokens() -> TokenList::determineCppC() #ifdef LOG_EMACS_MARKER diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index f7ccc9c0dc5..8b104813438 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -773,16 +773,6 @@ void Preprocessor::handleErrors(const simplecpp::OutputList& outputList, bool th } } -bool Preprocessor::loadFiles(const simplecpp::TokenList &rawtokens, std::vector &files) -{ - const simplecpp::DUI dui = createDUI(mSettings, "", mLang); - - simplecpp::OutputList outputList; - mFileCache = simplecpp::load(rawtokens, files, dui, &outputList); - handleErrors(outputList, false); - return !hasErrors(outputList); -} - void Preprocessor::removeComments(simplecpp::TokenList &tokens) const { tokens.removeComments(); diff --git a/lib/preprocessor.h b/lib/preprocessor.h index c1c034e2904..34ae6dfff72 100644 --- a/lib/preprocessor.h +++ b/lib/preprocessor.h @@ -120,8 +120,6 @@ class CPPCHECKLIB WARN_UNUSED Preprocessor { std::vector getRemarkComments(const simplecpp::TokenList &tokens) const; - bool loadFiles(const simplecpp::TokenList &rawtokens, std::vector &files); - void removeComments(simplecpp::TokenList &tokens) const; static void setPlatformInfo(simplecpp::TokenList &tokens, const Settings& settings); diff --git a/test/testcppcheck.cpp b/test/testcppcheck.cpp index c4b818b79b9..125ed6ebfd0 100644 --- a/test/testcppcheck.cpp +++ b/test/testcppcheck.cpp @@ -539,7 +539,6 @@ class TestCppcheck : public TestFixture { const simplecpp::TokenList tokens(istr, files, "m1.c"); Preprocessor preprocessor(settings, errorLogger, Standards::Language::C); - ASSERT(preprocessor.loadFiles(tokens, files)); AddonInfo premiumaddon; premiumaddon.name = "premiumaddon.json";