17 const std::string &message,
26 std::ostringstream formatted_message;
29 formatted_message <<
"error: warning treated as error\n";
33 formatted_message <<
file <<
'(' << line <<
"): ";
36 formatted_message <<
"error: ";
38 formatted_message <<
"warning: ";
40 formatted_message << message;
42 const auto full_path = location.
full_path();
44 if(full_path.has_value() && !line.empty())
50 const auto line_number = std::stoull(line);
51 std::string source_line;
52 for(std::size_t l = 0; l < line_number; l++)
53 std::getline(in, source_line);
57 formatted_message <<
'\n';
58 formatted_message <<
file <<
'(' << line <<
"): " << source_line;