Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [formatv] Add the ability to specify a fill character when aligning. | Zachary Turner | 2017-06-15 | 1 | -5/+8 |
| | | | | | | | | | Previously if you used fmt_align(7, Center) you would get the output ' 7 '. It may be desirable for the user to specify the fill character though, for example producing '---7---'. This patch adds that. llvm-svn: 305449 | ||||
* | Properly parse the TypeServer2 record. | Zachary Turner | 2017-02-03 | 1 | -3/+0 |
| | | | | llvm-svn: 294046 | ||||
* | Simplify format member detection in FormatVariadic | Pavel Labath | 2016-12-15 | 1 | -15/+16 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the format member search, which was quite complicated, with a more direct approach to detecting whether a class should be formatted using the format-member method. Instead we use a special type llvm::format_adapter, which every adapter must inherit from. Then the search can be simply implemented with the is_base_of type trait. Aside from the simplification, I like this way more because it makes it more explicit that you are supposed to use this type only for adapter-like formattings, and the other approach (format_provider overloads) should be used as a default (a mistake I made when first trying to use this library). The only slight change in behaviour here is that now choose the format-adapter branch even if the format member invocation will fail to compile (e.g. because it is a non-const member function and we are passing a const adapter), whereas previously we would have gone on to search for format_providers for the type. However, I think that is actually a good thing, as it probably means the programmer did something wrong. Reviewers: zturner, inglorion Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27679 llvm-svn: 289795 | ||||
* | Try to fix build after llvm::formatv() patch. | Zachary Turner | 2016-11-12 | 1 | -6/+6 |
| | | | | llvm-svn: 286686 | ||||
* | [Support] Introduce llvm::formatv() function. | Zachary Turner | 2016-11-11 | 1 | -0/+92 |
This introduces a new type-safe general purpose formatting library. It provides compile-time type safety, does not require a format specifier (since the type is deduced), and provides mechanisms for extending the format capability to user defined types, and overriding the formatting behavior for existing types. This patch additionally adds documentation for the API to the LLVM programmer's manual. Mailing List Thread: http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html Differential Revision: https://reviews.llvm.org/D25587 llvm-svn: 286682 |