Skip to content

Commit f2ea0cc

Browse files
committed
Sligtly improved debug output
1 parent f195c49 commit f2ea0cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: ArduinoDiagnosticConsumer.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ void ArduinoDiagnosticConsumer::HandleDiagnostic(DiagnosticsEngine::Level level,
5050
const SourceManager &sm = info.getSourceManager();
5151
const SourceLocation &loc = info.getLocation();
5252
const SourceLocation &sl = sm.getSpellingLoc(loc);
53+
const char *presumedFilename = sm.getPresumedLoc(sl).getFilename();
5354
if (debugOutput) {
54-
outs() << sm.getSpellingLineNumber(sl) << ":" << sm.getSpellingColumnNumber(sl) << " ";
55+
outs() << sm.getSpellingLineNumber(sl) << ":" << sm.getSpellingColumnNumber(sl) << " (";
56+
outs() << presumedFilename << ") ";
5557
}
5658

5759
unsigned id = info.getID();

0 commit comments

Comments
 (0)