User Details
- User Since
- Aug 19 2020, 5:26 PM (162 w, 1 h)
Sep 2 2022
Aug 15 2022
Thanks for your review @erichkeane!
May 5 2022
This is unfortunately true, unless we generate some code that calculates the length of the string at runtime. I find it difficult to draw the line between defining this built-in functionality and developers developing printf-like functionality, if built-in does too much, flexibility will decrease, if built-in does less, (features like length limits) then develop personnel may need to do some work. o(≧口≦)o
I found LLDB have this feature. LLDB uses "..." to indicate that only part of the string is now printed, and it also have a command to modify length limit. This approach is similar to the idea of @erichkeane, can we do the same?what do you all think?
typedef signed char int8_t; typedef unsigned char uint8_t;
May 4 2022
May 2 2022
Do we need to do argument promotion here,ahh...maybe i understood wrong
This implementation looks good to me😁
Apr 28 2022
Thank you all, I have commit in eaca933c59fd61b3df4697b5fae0eeec67acfaeb
Thanks for review @rsmith, @erichkeane and @aaron.ballman , I have add a newline back to the end of the test, and waiting for ci....
Add the newline back to the end of the test.
Apr 27 2022
While we'd usually be happy to take the fix-in-hand and apply it, part of the discussion on the other thread is whether to remove __builtin_dump_struct entirely. Because of that, I don't think we should make substantial changes in this area until it's clear we're keeping the builtin.
Apr 26 2022
Agree
Apr 25 2022
Thank you for inviting me to a discussion on this topic. I have something very confusing as follows:
Apr 23 2022
Should we use PrintingPolicy.Indentation instead of 4 hardcoded in dumpRecord?
Optimize the code according to @rsmith 's suggestion, and use analyze_printf::PrintfSpecifier::fixType instead of this static DenseMap to find the printf format specifier.
Apr 13 2022
Could you please help me review the code?@rsmith,thanks😊
Apr 7 2022
Apr 4 2022
Improve comment
I'll just add that in the recursive call, for record type, it will just print what's between {...}
Eg:
int printf(const char *, ...);
Can you guys please help me review this patch? 😁
Apr 3 2022
Apr 1 2022
Reformat code
Reformat code.
Mar 31 2022
I also agree that this is a useful debugging builtin, and no program logic should be forced to depend on the output of this builtin. It's just used to print out some useful debugging information
There is another question, which way should I print for an empty array?
Thanks for your suggestion @erichkeane !
Mar 30 2022
Thank you for the reviews @erichkeane. I've applied for commit access and commit in 907d3acefc3bdd6eb83f21589c6473ca7e88b3eb.
Mar 29 2022
Add this change into ReleaseNotes.
Fixed "Description" issue and removed useless newlines
split another patch to fix ReleaseNotes.
Thanks for review @erichkeane ,maybe i should split this patch.
Remove unnecessary code format
Mar 24 2022
Put the dump format changes under the "Non-comprehensive list of changes in this release" heading instead.
Waitting for CI...
Use `FD->getDeclName().empty() instead of FD->getNameAsString().empty()`
Add a the format changes to release notes
Maybe add the changes under "Attribute Changes in Clang"?
Support dump bitwidth of bitfields, and unnamed bitfields.
for example:
struct Bar { unsigned c : 1; unsigned : 3; unsigned : 0; unsigned b; };