[llvm-bugs] [Bug 35111] New: LLVM's YAML output has lots of trailing whitespace
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 27 13:08:26 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=35111
Bug ID: 35111
Summary: LLVM's YAML output has lots of trailing whitespace
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Support Libraries
Assignee: unassignedbugs at nondot.org
Reporter: rnk at google.com
CC: bigcheesegs at gmail.com, davide at freebsd.org,
llvm-bugs at lists.llvm.org, ruiu at google.com
This is observable in any file produced by obj2yaml, and is annoying when
checking in test YAML test cases. Git and other tools complain about trailing
whitespace, and it would be great if we could silence that without manually
removing the whitespace.
The bug is in Output::preflightKey, which pads out the column after emitting
the key name:
bool Output::preflightKey(const char *Key, bool Required, bool SameAsDefault,
bool &UseDefault, void *&) {
UseDefault = false;
if (Required || !SameAsDefault || WriteDefaultValues) {
auto State = StateStack.back();
if (State == inFlowMapFirstKey || State == inFlowMapOtherKey) {
flowKey(Key);
} else {
this->newLineCheck();
this->paddedKey(Key);
}
return true;
}
return false;
}
If there is no value or the value flows onto the next line, the padding
whitespace is left behind trailing.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171027/f21fca2b/attachment.html>
More information about the llvm-bugs
mailing list