Skip to content
Open
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
17 changes: 0 additions & 17 deletions source/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,23 +433,6 @@ auto _as(auto x)
}


// String path prefix from filename
//
auto strip_path(std::string const& file)
-> std::string
{
auto i = std::ssize(file)-1;
while (
i >= 0
&& file[i] != '\\'
&& file[i] != '/'
)
{
--i;
}
return {file, _as<size_t>(i+1)};
}


//-----------------------------------------------------------------------
//
Expand Down
5 changes: 4 additions & 1 deletion source/to_cpp1.h
Original file line number Diff line number Diff line change
Expand Up @@ -7191,7 +7191,10 @@ class cppfront
|| error != *prev
)
{
error.print(std::cerr, strip_path(sourcefile));
// The path as given, not just the file name, so an IDE can
// open the file even when cppfront runs in another folder
// (as build systems run it, in the output folder)
error.print(std::cerr, sourcefile);
}
prev = &error;
}
Expand Down