This patch adds a data formatter for NSDecimalNumber. The latter is a Foundation object used for representing and performing arithmetic on base-10 numbers that bridges to Decimal.
Details
Diff Detail
Event Timeline
source/Plugins/Language/ObjC/Cocoa.cpp | ||
---|---|---|
462 | Side note: It would be slightly faster/elegant to use a StringRef instead of the char* for the comparisons. | |
639 | Since the whole structure is one packed bitfield, an alternative implementation would be to read all 16b at once and memcpy to a local variable bitfield and let the compiler do the unpacking; that might be shorter. This version seems fine, too. |
I didn't check whether the representation was correct (although it looks lo). The structure of the patch looks fine to me, thanks for adding the comments :)
This looks fine to me. Nothing in the TypeSummaryOptions is relevant to printing these numbers, so it's correct to ignore them.
Side note: It would be slightly faster/elegant to use a StringRef instead of the char* for the comparisons.