@@ -1067,10 +1067,10 @@ void Preprocessor::dump(std::ostream &out) const
10671067 for (const simplecpp::MacroUsage ¯oUsage: mMacroUsage ) {
10681068 out << " <macro"
10691069 << " name=\" " << macroUsage.macroName << " \" "
1070- << " file=\" " << ErrorLogger::toxml (mTokens .file (macroUsage.macroLocation )) << " \" "
1070+ << " file=\" " << ErrorLogger::toxml (mSettings . relativePaths ? Path::getRelativePath ( mTokens . file (macroUsage. macroLocation ), mSettings . basePaths ) : mTokens .file (macroUsage.macroLocation )) << " \" "
10711071 << " line=\" " << macroUsage.macroLocation .line << " \" "
10721072 << " column=\" " << macroUsage.macroLocation .col << " \" "
1073- << " usefile=\" " << ErrorLogger::toxml (mTokens .file (macroUsage.useLocation )) << " \" "
1073+ << " usefile=\" " << ErrorLogger::toxml (mSettings . relativePaths ? Path::getRelativePath ( mTokens . file (macroUsage. useLocation ), mSettings . basePaths ) : mTokens .file (macroUsage.useLocation )) << " \" "
10741074 << " useline=\" " << macroUsage.useLocation .line << " \" "
10751075 << " usecolumn=\" " << macroUsage.useLocation .col << " \" "
10761076 << " is-known-value=\" " << bool_to_string (macroUsage.macroValueKnown ) << " \" "
@@ -1083,7 +1083,7 @@ void Preprocessor::dump(std::ostream &out) const
10831083 out << " <simplecpp-if-cond>" << std::endl;
10841084 for (const simplecpp::IfCond &ifCond: mIfCond ) {
10851085 out << " <if-cond"
1086- << " file=\" " << ErrorLogger::toxml (mTokens .file (ifCond.location )) << " \" "
1086+ << " file=\" " << ErrorLogger::toxml (mSettings . relativePaths ? Path::getRelativePath ( mTokens . file (ifCond. location ), mSettings . basePaths ) : mTokens .file (ifCond.location )) << " \" "
10871087 << " line=\" " << ifCond.location .line << " \" "
10881088 << " column=\" " << ifCond.location .col << " \" "
10891089 << " E=\" " << ErrorLogger::toxml (ifCond.E ) << " \" "
0 commit comments