Files
clang-p2996/llvm/test/Analysis/Lint
mikaelholmen 2d62ce4beb [ValueTracking] Remove faulty dereference of "InsertBefore" (#85034)
In 2fe81edef6
 [NFC][RemoveDIs] Insert instruction using iterators in Transforms/
we changed
       if (*req_idx != *i)
         return FindInsertedValue(I->getAggregateOperand(), idx_range,
-                                 InsertBefore);
+                                 *InsertBefore);
     }
but there is no guarantee that is InsertBefore is non-empty at that
point,
which we e.g can see in the added testcase.

Instead just pass on the optional InsertBefore in the recursive call to
FindInsertedValue, as we do at several other places already.
2024-03-13 09:58:47 +01:00
..