Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion lib/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ bool Path::acceptFile(const std::string &path, const std::set<std::string> &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
Expand Down
10 changes: 0 additions & 10 deletions lib/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,16 +773,6 @@ void Preprocessor::handleErrors(const simplecpp::OutputList& outputList, bool th
}
}

bool Preprocessor::loadFiles(const simplecpp::TokenList &rawtokens, std::vector<std::string> &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();
Expand Down
2 changes: 0 additions & 2 deletions lib/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ class CPPCHECKLIB WARN_UNUSED Preprocessor {

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

bool loadFiles(const simplecpp::TokenList &rawtokens, std::vector<std::string> &files);

void removeComments(simplecpp::TokenList &tokens) const;

static void setPlatformInfo(simplecpp::TokenList &tokens, const Settings& settings);
Expand Down
1 change: 0 additions & 1 deletion test/testcppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading