[all-commits] [llvm/llvm-project] 4f5648: [PointerUnionTest] Fix an incorrectly written test

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Jun 7 11:27:08 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f5648adc588e23e2bf52e189030c792a6f1586a
      https://github.com/llvm/llvm-project/commit/4f5648adc588e23e2bf52e189030c792a6f1586a
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-06-07 (Tue, 07 Jun 2022)

  Changed paths:
    M llvm/unittests/ADT/PointerUnionTest.cpp

  Log Message:
  -----------
  [PointerUnionTest] Fix an incorrectly written test

The test being change appears to have been intended to exercise PointerUnion, but what it actually did was cast<> a double to a double*.  This only worked because cast<> was missing the required assertion.  Adding the assertion reveals a template error where isa<const double*>(double) fails to compile.




More information about the All-commits mailing list