They were being applied too narrowly (they didn't cover signed char *,
for instance), and too broadly (they covered SomeTemplate<char[6]>) at
the same time.
Depends on D112708.
Paths
| Differential D112709
[lldb] Fix matchers for char array formatters ClosedPublic Authored by labath on Oct 28 2021, 5:15 AM.
Details Summary They were being applied too narrowly (they didn't cover signed char *, Depends on D112708.
Diff Detail
Event TimelineComment Actions Nice catch!
labath added a child revision: D113174: [lldb] Summary provider for char flexible array members.Nov 4 2021, 2:14 AM Comment Actions The substance is fine, you kept the common cases fast and then added fallback for the others with the regex. That test seems like an object lesson in what not to do in an inline test, but that wasn't your invention, so it's hard to complain too much. This revision is now accepted and ready to land.Dec 16 2021, 12:13 PM Closed by commit rG11dc235c7dda: [lldb] Fix matchers for char array formatters (authored by labath). · Explain WhyDec 17 2021, 1:10 AM This revision was automatically updated to reflect the committed changes. Comment Actions Pavel, I apologize no one let you know earlier but it looks like this change broke TestFormattersBoolRefPtr.py test. see: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/39449/ Comment Actions
@aprantl corrected me, it can vary on some platforms it is signed char but on others it is bool. labath added a reverting change: rG31c7165a2bd6: [lldb] Remove summary for signed char *.Jan 6 2022, 10:52 AM Comment Actions Thanks for the heads up. I've reverted the problematic parts in 31c7165a2b. I'll come with a proper fix soon-ish. Comment Actions
For those interested, Objective-C BOOL is a signed char on macOS and 32-bit iOS and bool on 64-bit iOS and derived platforms (watchOS & tvOS).
Revision Contents
Diff 382994 lldb/source/DataFormatters/FormatManager.cpp
lldb/test/API/functionalities/data-formatter/stringprinter/main.cpp |
It feels like writing out the decls by hand would have been quicker but perhaps less satisfying...