[all-commits] [llvm/llvm-project] 5b949a: Fix crash when diagnosing a CTAD failure in an arr...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Mon Oct 18 11:02:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b949a649aff0406a878e8eb8d7d5efba0a55e4a
      https://github.com/llvm/llvm-project/commit/5b949a649aff0406a878e8eb8d7d5efba0a55e4a
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2021-10-18 (Mon, 18 Oct 2021)

  Changed paths:
    M clang/lib/Sema/SemaExprCXX.cpp
    A clang/test/SemaCXX/new-delete-array.cpp

  Log Message:
  -----------
  Fix crash when diagnosing a CTAD failure in an array new expression

This appears to be a think-o where the developer was trying to check for a null
pointer but was actually checking (redundantly) whether the optional held a
valid value or not. We now properly check the pointer for null.

This fixes PR51547.




More information about the All-commits mailing list