@@ -183,13 +183,14 @@ escape_d_format (const char *format)
183183 front-end, which does not get translated by the gcc diagnostic routines. */
184184
185185static void ATTRIBUTE_GCC_DIAG (3 ,0 )
186- d_diagnostic_report_diagnostic (const Loc &loc, int opt, const char *format,
187- va_list ap, diagnostic_t kind, bool verbatim)
186+ d_diagnostic_report_diagnostic (const SourceLoc &loc, int opt,
187+ const char *format, va_list ap,
188+ diagnostic_t kind, bool verbatim)
188189{
189190 va_list argp;
190191 va_copy (argp, ap);
191192
192- if (loc.filename () || !verbatim)
193+ if (loc.filename . length != 0 || !verbatim)
193194 {
194195 rich_location rich_loc (line_table, make_location_t (loc));
195196 diagnostic_info diagnostic;
@@ -220,8 +221,8 @@ d_diagnostic_report_diagnostic (const Loc &loc, int opt, const char *format,
220221 error count depending on how KIND is treated. */
221222
222223void D_ATTRIBUTE_FORMAT (2 ,0 ) ATTRIBUTE_GCC_DIAG(2 ,0 )
223- verrorReport (const Loc& loc, const char *format, va_list ap, ErrorKind kind ,
224- const char *prefix1, const char *prefix2)
224+ verrorReport (const SourceLoc loc, const char *format, va_list ap,
225+ ErrorKind kind, const char *prefix1, const char *prefix2)
225226{
226227 diagnostic_t diag_kind = DK_UNSPECIFIED;
227228 int opt = 0 ;
@@ -304,7 +305,7 @@ verrorReport (const Loc& loc, const char *format, va_list ap, ErrorKind kind,
304305 explicit location LOC. This doesn't increase the global error count. */
305306
306307void D_ATTRIBUTE_FORMAT (2 ,0 ) ATTRIBUTE_GCC_DIAG(2 ,0 )
307- verrorReportSupplemental (const Loc& loc, const char * format, va_list ap,
308+ verrorReportSupplemental (const SourceLoc loc, const char * format, va_list ap,
308309 ErrorKind kind)
309310{
310311 if (kind == ErrorKind::error)
0 commit comments