8000 Sligtly improved debug output · arduino/arduino-preprocessor@f2ea0cc · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

ArduinoDiagnosticConsumer.cpp

Lines changed: 3 additions & 1 deletion
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)
0