Skip to content

Commit 6bce79e

Browse files
committed
test
1 parent 08bd742 commit 6bce79e

5 files changed

Lines changed: 24 additions & 154 deletions

File tree

.github/workflows/CI-unixish.yml

Lines changed: 0 additions & 110 deletions
This file was deleted.

.github/workflows/CI-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
build:
1616
strategy:
1717
matrix:
18-
os: [windows-2022, windows-2025]
19-
config: [Release, Debug]
18+
os: [windows-2025]
19+
config: [Debug]
2020
fail-fast: false
2121

2222
runs-on: ${{ matrix.os }}

.github/workflows/clang-tidy.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,21 @@ int main(int argc, char **argv)
128128
rawtokens->removeComments();
129129
simplecpp::TokenList outputTokens(files);
130130
simplecpp::FileDataCache filedata;
131+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
131132
simplecpp::preprocess(outputTokens, *rawtokens, files, filedata, dui, &outputList);
133+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
132134
simplecpp::cleanup(filedata);
135+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
133136
delete rawtokens;
134137
rawtokens = nullptr;
138+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
135139

136140
// Output
137141
if (!quiet) {
138142
if (!error_only)
139143
std::cout << outputTokens.stringify() << std::endl;
140144

145+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
141146
for (const simplecpp::Output &output : outputList) {
142147
std::cerr << output.location.file() << ':' << output.location.line << ": ";
143148
switch (output.type) {
@@ -176,6 +181,7 @@ int main(int argc, char **argv)
176181
}
177182
}
178183

184+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
179185
if (fail_on_error && !outputList.empty())
180186
return 1;
181187

simplecpp.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,9 @@ simplecpp::TokenList::TokenList(TokenList &&other) : frontToken(nullptr), backTo
515515

516516
simplecpp::TokenList::~TokenList()
517517
{
518+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
518519
clear();
520+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
519521
}
520522

521523
simplecpp::TokenList &simplecpp::TokenList::operator=(const TokenList &other)
@@ -548,6 +550,7 @@ void simplecpp::TokenList::clear()
548550
{
549551
backToken = nullptr;
550552
while (frontToken) {
553+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
551554
Token * const next = frontToken->next;
552555
delete frontToken;
553556
frontToken = next;
@@ -3088,8 +3091,9 @@ simplecpp::FileData *simplecpp::FileDataCache::lookup(const std::string &sourcef
30883091
return nullptr;
30893092
}
30903093

3091-
for (std::list<std::string>::const_iterator it = dui.includePaths.begin(); it != dui.includePaths.end(); ++it) {
3092-
const std::string path = getIncludePathFileName(*it, header);
3094+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
3095+
for (const auto &includePath : dui.includePaths) {
3096+
const std::string path = getIncludePathFileName(includePath, header);
30933097
const auto name_it = mNameMap.find(path);
30943098

30953099
if (name_it != mNameMap.end())
@@ -3133,11 +3137,14 @@ std::pair<bool, simplecpp::FileData *> simplecpp::FileDataCache::load(const std:
31333137

31343138
std::pair<bool, simplecpp::FileData *> simplecpp::FileDataCache::get(const std::string &sourcefile, const std::string &header, const simplecpp::DUI &dui, bool systemheader, std::vector<std::string> &filenames, simplecpp::OutputList *outputList)
31353139
{
3140+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
31363141
FileData *const data = lookup(sourcefile, header, dui, systemheader);
31373142

3143+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
31383144
if (data != nullptr)
31393145
return std::make_pair(false, data);
31403146

3147+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
31413148
return load(sourcefile, header, dui, systemheader, filenames, outputList);
31423149
}
31433150

@@ -3309,11 +3316,13 @@ static std::string getTimeDefine(const struct tm *timep)
33093316

33103317
void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenList &rawtokens, std::vector<std::string> &files, simplecpp::FileDataCache &cache, const simplecpp::DUI &dui, simplecpp::OutputList *outputList, std::list<simplecpp::MacroUsage> *macroUsage, std::list<simplecpp::IfCond> *ifCond)
33113318
{
3319+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
33123320
#ifdef SIMPLECPP_WINDOWS
33133321
if (dui.clearIncludeCache)
33143322
nonExistingFilesCache.clear();
33153323
#endif
3316-
3324+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
3325+
33173326
std::map<std::string, std::size_t> sizeOfType(rawtokens.sizeOfType);
33183327
sizeOfType.insert(std::make_pair("char", sizeof(char)));
33193328
sizeOfType.insert(std::make_pair("short", sizeof(short)));
@@ -3404,6 +3413,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
34043413
includetokenstack.push(filedata->tokens.cfront());
34053414
}
34063415

3416+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
34073417
std::map<std::string, std::list<Location> > maybeUsedMacros;
34083418

34093419
for (const Token *rawtok = nullptr; rawtok || !includetokenstack.empty();) {
@@ -3519,11 +3529,13 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
35193529
return;
35203530
}
35213531

3532+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
35223533
const Token * const inctok = inc2.cfront();
35233534

35243535
const bool systemheader = (inctok->str()[0] == '<');
35253536
const std::string header(inctok->str().substr(1U, inctok->str().size() - 2U));
35263537
const FileData *const filedata = cache.get(rawtok->location.file(), header, dui, systemheader, files, outputList).second;
3538+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
35273539
if (filedata == nullptr) {
35283540
if (outputList) {
35293541
simplecpp::Output out(files);
@@ -3752,6 +3764,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
37523764
output.takeTokens(tokens);
37533765
}
37543766
}
3767+
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
37553768

37563769
if (macroUsage) {
37573770
for (simplecpp::MacroMap::const_iterator macroIt = macros.begin(); macroIt != macros.end(); ++macroIt) {

0 commit comments

Comments
 (0)