1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/unittests
Pavel Labath efce575f1d [Support] Fix return type deduction in RetryAfterSignal
The default value of the ResultT template argument (which was there only
to avoid spelling out the long std::result_of template multiple times)
was being overriden by function call template argument deduction. This
manifested itself as a compiler error when calling the function as
FILE *X = RetryAfterSignal(nullptr, fopen, ...)
because the function would try to assign the result of fopen to
nullptr_t, but a more insidious side effect was that
RetryAfterSignal(-1, read, ...) would return "int" instead of "ssize_t",
losing precision along the way.

I fix this by having the function take the argument in a way that
prevents argument deduction from kicking in and add a test that makes
sure the return type is correct.

llvm-svn: 306003
2017-06-22 13:55:54 +00:00
..
ADT Revert r305642 2017-06-18 10:15:57 +00:00
Analysis GlobalsModRef: Ensure optnone+readonly/readnone attributes are respected 2017-06-07 21:37:39 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
BinaryFormat Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
Bitcode Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
CodeGen Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC. 2017-06-15 21:00:40 +00:00
DebugInfo [PDB] Add symbols to the PDB 2017-06-21 17:25:56 +00:00
ExecutionEngine Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
IR Align definition of DW_OP_plus with DWARF spec [3/3] 2017-06-14 13:14:38 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
MC Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MI UnitTests: Followup to 305519 2017-06-15 22:50:57 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
ProfileData [Coverage] PR33517: Check for failure to load func records 2017-06-20 02:05:35 +00:00
Support [Support] Fix return type deduction in RetryAfterSignal 2017-06-22 13:55:54 +00:00
Target UnitTests: Followup to 305519 2017-06-15 22:50:57 +00:00
Transforms Supressed warning: declared ‘static’ but never defined. 2017-06-14 17:30:35 +00:00
XRay [XRay][graph] Disambiguate name of type from member name 2017-02-10 06:59:25 +00:00
CMakeLists.txt Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00