llvm/unittests
Craig Topper b4e05013d0 [ValueTracking] Avoid undefined behavior in unittest by not making a named ArrayRef from a std::initializer_list
One of the ValueTracking unittests creates a named ArrayRef initialized by a std::initializer_list. The underlying array for an std::initializer_list is only guaranteed to have a lifetime as long as the initializer_list object itself. So this can leave the ArrayRef pointing at an array that no long exists.

This fixes this to just create an explicit array instead of an ArrayRef.

Differential Revision: https://reviews.llvm.org/D32089




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300354 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-14 17:59:19 +00:00
..
ADT Add more test cases for StringRef::edit_distance 2017-04-14 08:34:32 +00:00
Analysis [ValueTracking] Avoid undefined behavior in unittest by not making a named ArrayRef from a std::initializer_list 2017-04-14 17:59:19 +00:00
AsmParser
Bitcode
CodeGen
DebugInfo [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
ExecutionEngine [ORC] Re-enable the Error/Expected unit tests that were disabled in r300177. 2017-04-14 00:06:12 +00:00
IR [IR] Redesign the case iterator in SwitchInst to actually be an iterator 2017-04-12 07:27:28 +00:00
LineEditor
Linker
MC
MI Fix subreg value numbers in handleMoveUp 2017-03-11 00:14:52 +00:00
Object
ObjectYAML
Option Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
ProfileData Fix signed/unsigned comparison warning 2017-03-11 19:38:22 +00:00
Support [Support] Add support for unique_ptr<> to Casting.h. 2017-04-12 19:59:37 +00:00
Target
Transforms MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
XRay
CMakeLists.txt