[all-commits] [llvm/llvm-project] c88d73: [clang] Crash when referencing capture in static l...

Ben Jackson via All-commits all-commits at lists.llvm.org
Mon Dec 11 22:30:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c88d73164a3960c5ef3ff578631f0e765b893809
      https://github.com/llvm/llvm-project/commit/c88d73164a3960c5ef3ff578631f0e765b893809
  Author: Ben Jackson <puremourning at users.noreply.github.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/Parser/cxx2b-lambdas.cpp

  Log Message:
  -----------
  [clang] Crash when referencing capture in static lambda (#74661)

The constant evaluator could try to reference a lambda capture in a
static lambda call operator. Static lambdas can't have captures, so we
simply abort. Either the lambda needs to be made non-static, or the
capture (and reference to it) need to be removed.

Fixes: https://github.com/llvm/llvm-project/issues/74608




More information about the All-commits mailing list