[PATCH] D32089: [ValueTracking] Avoid undefined behavior in unittest by not making a named ArrayRef from a std::initializer_list

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 11:12:08 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL300354: [ValueTracking] Avoid undefined behavior in unittest by not making a named… (authored by ctopper).

Changed prior to commit:
  https://reviews.llvm.org/D32089?vs=95315&id=95324#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32089

Files:
  llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp


Index: llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
===================================================================
--- llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
+++ llvm/trunk/unittests/Analysis/ValueTrackingTest.cpp
@@ -219,7 +219,7 @@
   assert(F && "Bad assembly?");
 
   auto &BB = F->getEntryBlock();
-  ArrayRef<bool> ExpectedAnswers = {
+  bool ExpectedAnswers[] = {
       true,  // call void @nounwind_readonly(i32* %p)
       true,  // call void @nounwind_argmemonly(i32* %p)
       false, // call void @throws_but_readonly(i32* %p)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32089.95324.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170414/5fcdb811/attachment.bin>


More information about the llvm-commits mailing list