[PATCH] D151301: [clang][Diagnostics] Print empty lines in multiline snippets
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 24 01:03:31 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/lib/Frontend/TextDiagnostic.cpp:1246
// line from what the user is intended to see.
- if (DiagOpts->ShowSourceRanges) {
+ if (DiagOpts->ShowSourceRanges && !SourceLine.empty()) {
SourceLine = ' ' + SourceLine;
----------------
This is a special case (and probably unneeded?), but otherwise we get 2 empty lines for an empty source line when we print source range info.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151301/new/
https://reviews.llvm.org/D151301
More information about the cfe-commits
mailing list