mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 06:06:19 +00:00
d11d167713
Summary: The existing detection of a format member function has a couple of deficiencies: - the member function does not get detected if one calls formatv with an lvalue, because the template parameter gets deduced as T&, which fails the is_class check. - it also did not work if the function was called with a const variable because the template parameter would get deduced as const T&, again failing the is_class check. This fixes the problem by stripping the references in the uses_format_member template, to make sure the type is correctly detected as class. It also provides specializations of the has_FormatMember template for const and non-const members of the types in order to enable declaring the format member as a "const" function. I have added tests that verify that formatv can be now called in these scenarios. As some scenarios could not be verified at runtime (e.g. making sure that calling a non-const format member on a const object does *not* compile), I have also added some static_asserts which test the behaviour of the template classes used internally by formatv(). Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27525 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289040 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AlignOfTest.cpp | ||
AllocatorTest.cpp | ||
ArrayRecyclerTest.cpp | ||
BlockFrequencyTest.cpp | ||
BranchProbabilityTest.cpp | ||
Casting.cpp | ||
Chrono.cpp | ||
CMakeLists.txt | ||
CommandLineTest.cpp | ||
CompressionTest.cpp | ||
ConvertUTFTest.cpp | ||
DataExtractorTest.cpp | ||
DwarfTest.cpp | ||
EndianStreamTest.cpp | ||
EndianTest.cpp | ||
ErrorOrTest.cpp | ||
ErrorTest.cpp | ||
FileOutputBufferTest.cpp | ||
formatted_raw_ostream_test.cpp | ||
FormatVariadicTest.cpp | ||
Host.cpp | ||
LEB128Test.cpp | ||
LineIteratorTest.cpp | ||
LockFileManagerTest.cpp | ||
ManagedStatic.cpp | ||
MathExtrasTest.cpp | ||
MD5Test.cpp | ||
MemoryBufferTest.cpp | ||
MemoryTest.cpp | ||
NativeFormatTests.cpp | ||
Path.cpp | ||
ProcessTest.cpp | ||
ProgramTest.cpp | ||
raw_ostream_test.cpp | ||
raw_pwrite_stream_test.cpp | ||
raw_sha1_ostream_test.cpp | ||
RegexTest.cpp | ||
ReplaceFileTest.cpp | ||
ScaledNumberTest.cpp | ||
SourceMgrTest.cpp | ||
SpecialCaseListTest.cpp | ||
StringPool.cpp | ||
SwapByteOrderTest.cpp | ||
TargetParserTest.cpp | ||
Threading.cpp | ||
ThreadLocalTest.cpp | ||
ThreadPool.cpp | ||
TimerTest.cpp | ||
TrailingObjectsTest.cpp | ||
TrigramIndexTest.cpp | ||
TypeNameTest.cpp | ||
UnicodeTest.cpp | ||
xxhashTest.cpp | ||
YAMLIOTest.cpp | ||
YAMLParserTest.cpp |