Skip to content

Commit a360c0b

Browse files
committed
Remove Preprocessor::loadFiles
1 parent 6e55812 commit a360c0b

5 files changed

Lines changed: 0 additions & 17 deletions

File tree

lib/cppcheck.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -993,9 +993,6 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
993993

994994
Preprocessor preprocessor(mSettings, mErrorLogger, file.lang());
995995

996-
if (!preprocessor.loadFiles(tokens1, files))
997-
return mLogger->exitcode();
998-
999996
if (!mSettings.plistOutput.empty()) {
1000997
std::string filename2;
1001998
if (file.spath().find('/') != std::string::npos)

lib/path.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ bool Path::acceptFile(const std::string &path, const std::set<std::string> &extr
230230
static bool hasEmacsCppMarker(const char* path)
231231
{
232232
// TODO: identify is called three times for each file
233-
// Preprocessor::loadFiles() -> createDUI()
234233
// Preprocessor::preprocess() -> createDUI()
235234
// TokenList::createTokens() -> TokenList::determineCppC()
236235
#ifdef LOG_EMACS_MARKER

lib/preprocessor.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -773,16 +773,6 @@ void Preprocessor::handleErrors(const simplecpp::OutputList& outputList, bool th
773773
}
774774
}
775775

776-
bool Preprocessor::loadFiles(const simplecpp::TokenList &rawtokens, std::vector<std::string> &files)
777-
{
778-
const simplecpp::DUI dui = createDUI(mSettings, "", mLang);
779-
780-
simplecpp::OutputList outputList;
781-
mFileCache = simplecpp::load(rawtokens, files, dui, &outputList);
782-
handleErrors(outputList, false);
783-
return !hasErrors(outputList);
784-
}
785-
786776
void Preprocessor::removeComments(simplecpp::TokenList &tokens) const
787777
{
788778
tokens.removeComments();

lib/preprocessor.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ class CPPCHECKLIB WARN_UNUSED Preprocessor {
120120

121121
std::vector<RemarkComment> getRemarkComments(const simplecpp::TokenList &tokens) const;
122122

123-
bool loadFiles(const simplecpp::TokenList &rawtokens, std::vector<std::string> &files);
124-
125123
void removeComments(simplecpp::TokenList &tokens) const;
126124

127125
static void setPlatformInfo(simplecpp::TokenList &tokens, const Settings& settings);

test/testcppcheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ class TestCppcheck : public TestFixture {
539539
const simplecpp::TokenList tokens(istr, files, "m1.c");
540540

541541
Preprocessor preprocessor(settings, errorLogger, Standards::Language::C);
542-
ASSERT(preprocessor.loadFiles(tokens, files));
543542

544543
AddonInfo premiumaddon;
545544
premiumaddon.name = "premiumaddon.json";

0 commit comments

Comments
 (0)