llvm-6502/unittests/Support
David Blaikie 38a4f3bbec Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type.
An unpleasant surprise while migrating unique_ptrs (see changes in
lib/Object): ErrorOr<int*> was implicitly convertible to
ErrorOr<std::unique_ptr<int>>.

Keep the explicit conversions otherwise it's a pain to convert
ErrorOr<int*> to ErrorOr<std::unique_ptr<int>>.

I'm not sure if there should be more SFINAE on those explicit ctors (I
could check if !is_convertible && is_constructible, but since the ctor
has to be called explicitly I don't think there's any need to disable
them when !is_constructible - they'll just fail anyway. It's the
converting ctors that can create interesting ambiguities without proper
SFINAE). I had to SFINAE the explicit ones because otherwise they'd be
ambiguous with the implicit ones in an explicit context, so far as I
could tell.

The converting assignment operators seemed unnecessary (and similarly
buggy/dangerous) - just rely on the converting ctors to convert to the
right type for assignment instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217048 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 17:31:25 +00:00
..
AlignOfTest.cpp
AllocatorTest.cpp BumpPtrAllocator: use uintptr_t when aligning addresses to avoid undefined behaviour 2014-09-02 21:51:35 +00:00
ArrayRecyclerTest.cpp
BlockFrequencyTest.cpp
BranchProbabilityTest.cpp
Casting.cpp
CMakeLists.txt Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics. 2014-07-09 19:40:08 +00:00
CommandLineTest.cpp Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind 2014-08-22 19:29:17 +00:00
CompressionTest.cpp
ConvertUTFTest.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
DataExtractorTest.cpp
EndianTest.cpp
ErrorOrTest.cpp Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type. 2014-09-03 17:31:25 +00:00
FileOutputBufferTest.cpp Remove the last uses of 'using std::error_code' 2014-06-13 03:20:08 +00:00
formatted_raw_ostream_test.cpp
IteratorTest.cpp
LEB128Test.cpp [Support] Fix the overflow bug in ULEB128 decoding. 2014-08-22 16:29:45 +00:00
LineIteratorTest.cpp Convert a few more cases of direct intialization of unique_ptrs from MemoryBuffer::getMemBuffer to move initialization now that it returns by unique_ptr instead of raw pointer. 2014-08-27 20:14:18 +00:00
LockFileManagerTest.cpp Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings. 2014-08-13 11:17:41 +00:00
Makefile
ManagedStatic.cpp Re-apply r211287: Remove support for LLVM runtime multi-threading. 2014-06-27 15:13:01 +00:00
MathExtrasTest.cpp
MD5Test.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
MemoryBufferTest.cpp Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
MemoryTest.cpp Remove the last uses of 'using std::error_code' 2014-06-13 03:20:08 +00:00
Path.cpp Fix Path unittests on Windows after raw_fd_ostream changes 2014-08-26 00:24:23 +00:00
ProcessTest.cpp Cleaning up static initializers in TimeValue. 2014-08-29 01:05:12 +00:00
ProgramTest.cpp
raw_ostream_test.cpp
RegexTest.cpp
ScaledNumberTest.cpp Remove unused typedef. GCC warns about this. 2014-07-01 15:39:32 +00:00
SourceMgrTest.cpp Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00
SpecialCaseListTest.cpp unique_ptrify the result of SpecialCaseList::create 2014-09-02 18:13:54 +00:00
StringPool.cpp PR10140 - StringPool's PooledStringPtr has non-const operator== causing bad OR-result. 2014-06-19 00:26:49 +00:00
SwapByteOrderTest.cpp Adding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a value in place 2014-06-14 12:52:55 +00:00
ThreadLocalTest.cpp
TimeValueTest.cpp
UnicodeTest.cpp
YAMLIOTest.cpp Fix bug 20125 - clang-format segfaults on bad config. 2014-08-08 13:58:00 +00:00
YAMLParserTest.cpp Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00