@@ -548,6 +548,7 @@ void simplecpp::TokenList::clear()
548548{
549549 backToken = nullptr ;
550550 while (frontToken) {
551+ std::cout << __FILE__ << " :" << __LINE__ << std::endl;
551552 Token * const next = frontToken->next ;
552553 delete frontToken;
553554 frontToken = next;
@@ -3088,8 +3089,9 @@ simplecpp::FileData *simplecpp::FileDataCache::lookup(const std::string &sourcef
30883089 return nullptr ;
30893090 }
30903091
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);
3092+ std::cout << __LINE__ << std::endl;
3093+ for (const auto &includePath : dui.includePaths ) {
3094+ const std::string path = getIncludePathFileName (includePath, header);
30933095 const auto name_it = mNameMap .find (path);
30943096
30953097 if (name_it != mNameMap .end ())
@@ -3133,11 +3135,14 @@ std::pair<bool, simplecpp::FileData *> simplecpp::FileDataCache::load(const std:
31333135
31343136std::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)
31353137{
3138+ std::cout << __LINE__ << std::endl;
31363139 FileData *const data = lookup (sourcefile, header, dui, systemheader);
31373140
3141+ std::cout << __LINE__ << std::endl;
31383142 if (data != nullptr )
31393143 return std::make_pair (false , data);
31403144
3145+ std::cout << __LINE__ << std::endl;
31413146 return load (sourcefile, header, dui, systemheader, filenames, outputList);
31423147}
31433148
@@ -3309,11 +3314,13 @@ static std::string getTimeDefine(const struct tm *timep)
33093314
33103315void 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)
33113316{
3317+ std::cout << __LINE__ << std::endl;
33123318#ifdef SIMPLECPP_WINDOWS
33133319 if (dui.clearIncludeCache )
33143320 nonExistingFilesCache.clear ();
33153321#endif
3316-
3322+ std::cout << __LINE__ << std::endl;
3323+
33173324 std::map<std::string, std::size_t > sizeOfType (rawtokens.sizeOfType );
33183325 sizeOfType.insert (std::make_pair (" char" , sizeof (char )));
33193326 sizeOfType.insert (std::make_pair (" short" , sizeof (short )));
@@ -3404,6 +3411,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
34043411 includetokenstack.push (filedata->tokens .cfront ());
34053412 }
34063413
3414+ std::cout << __LINE__ << std::endl;
34073415 std::map<std::string, std::list<Location> > maybeUsedMacros;
34083416
34093417 for (const Token *rawtok = nullptr ; rawtok || !includetokenstack.empty ();) {
@@ -3519,11 +3527,13 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
35193527 return ;
35203528 }
35213529
3530+ std::cout << __LINE__ << std::endl;
35223531 const Token * const inctok = inc2.cfront ();
35233532
35243533 const bool systemheader = (inctok->str ()[0 ] == ' <' );
35253534 const std::string header (inctok->str ().substr (1U , inctok->str ().size () - 2U ));
35263535 const FileData *const filedata = cache.get (rawtok->location .file (), header, dui, systemheader, files, outputList).second ;
3536+ std::cout << __LINE__ << std::endl;
35273537 if (filedata == nullptr ) {
35283538 if (outputList) {
35293539 simplecpp::Output out (files);
@@ -3752,6 +3762,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
37523762 output.takeTokens (tokens);
37533763 }
37543764 }
3765+ std::cout << __LINE__ << std::endl;
37553766
37563767 if (macroUsage) {
37573768 for (simplecpp::MacroMap::const_iterator macroIt = macros.begin (); macroIt != macros.end (); ++macroIt) {
0 commit comments