[all-commits] [llvm/llvm-project] 9f6b31: [Clang] Fix lambda CheckForDefaultedFunction(...) ...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Fri Sep 2 19:05:08 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f6b3199d33c146937f29feb62e123f34138f770
      https://github.com/llvm/llvm-project/commit/9f6b3199d33c146937f29feb62e123f34138f770
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2022-09-02 (Fri, 02 Sep 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/SemaCXX/constant-expression-cxx2a.cpp

  Log Message:
  -----------
  [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is not deleted before attempting to call DefineDefaultedFunction(...)

I discovered this additional bug at the end of working on D132906

In Sema::CheckCompletedCXXClass(...)  uses a lambda CheckForDefaultedFunction to
verify each CXXMethodDecl holds to the expected invariants before passing them
on to CheckForDefaultedFunction.

It is currently missing a check that it is not deleted, this adds that check and
a test that crashed without this check.

This fixes: https://github.com/llvm/llvm-project/issues/57516

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




More information about the All-commits mailing list