forked from OSchip/llvm-project
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 |
||
|---|---|---|
| .. | ||
| AlignOfTest.cpp | ||
| AllocatorTest.cpp | ||
| ArrayRecyclerTest.cpp | ||
| BlockFrequencyTest.cpp | ||
| BranchProbabilityTest.cpp | ||
| CMakeLists.txt | ||
| Casting.cpp | ||
| Chrono.cpp | ||
| CommandLineTest.cpp | ||
| CompressionTest.cpp | ||
| ConvertUTFTest.cpp | ||
| DataExtractorTest.cpp | ||
| DwarfTest.cpp | ||
| EndianStreamTest.cpp | ||
| EndianTest.cpp | ||
| ErrorOrTest.cpp | ||
| ErrorTest.cpp | ||
| FileOutputBufferTest.cpp | ||
| FormatVariadicTest.cpp | ||
| Host.cpp | ||
| LEB128Test.cpp | ||
| LineIteratorTest.cpp | ||
| LockFileManagerTest.cpp | ||
| MD5Test.cpp | ||
| ManagedStatic.cpp | ||
| MathExtrasTest.cpp | ||
| MemoryBufferTest.cpp | ||
| MemoryTest.cpp | ||
| NativeFormatTests.cpp | ||
| Path.cpp | ||
| ProcessTest.cpp | ||
| ProgramTest.cpp | ||
| RegexTest.cpp | ||
| ReplaceFileTest.cpp | ||
| ScaledNumberTest.cpp | ||
| SourceMgrTest.cpp | ||
| SpecialCaseListTest.cpp | ||
| StringPool.cpp | ||
| SwapByteOrderTest.cpp | ||
| TargetParserTest.cpp | ||
| ThreadLocalTest.cpp | ||
| ThreadPool.cpp | ||
| Threading.cpp | ||
| TimerTest.cpp | ||
| TrailingObjectsTest.cpp | ||
| TrigramIndexTest.cpp | ||
| TypeNameTest.cpp | ||
| UnicodeTest.cpp | ||
| YAMLIOTest.cpp | ||
| YAMLParserTest.cpp | ||
| formatted_raw_ostream_test.cpp | ||
| raw_ostream_test.cpp | ||
| raw_pwrite_stream_test.cpp | ||
| raw_sha1_ostream_test.cpp | ||
| xxhashTest.cpp | ||