llvm/unittests/Analysis
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
..
AliasAnalysisTest.cpp
BlockFrequencyInfoTest.cpp
BranchProbabilityInfoTest.cpp
CallGraphTest.cpp
CFGTest.cpp
CGSCCPassManagerTest.cpp
CMakeLists.txt
LazyCallGraphTest.cpp
LoopInfoTest.cpp
MemoryBuiltinsTest.cpp
MemorySSA.cpp
ProfileSummaryInfoTest.cpp
ScalarEvolutionTest.cpp Add a unit test for SCEV Normalization 2017-04-14 15:50:04 +00:00
TargetLibraryInfoTest.cpp
TBAATest.cpp
UnrollAnalyzer.cpp
ValueTrackingTest.cpp [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