[all-commits] [llvm/llvm-project] 418de7: Fix UB in one libcxx test, when deleting D through...

Quuxplusone via All-commits all-commits at lists.llvm.org
Wed Nov 4 14:35:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 418de7d5d84aa95a644139f87319269841a44315
      https://github.com/llvm/llvm-project/commit/418de7d5d84aa95a644139f87319269841a44315
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp

  Log Message:
  -----------
  Fix UB in one libcxx test, when deleting D through a pointer to B.

This undefined behavior was found by applying Lénárd Szolnoki's proposal
to disable implicit conversion of default_delete<D> to default_delete<B>.

The offending part of the test is circa line 243.

The wording that makes it undefined behavior is http://eel.is/c++draft/expr.delete#3 .

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




More information about the All-commits mailing list