[all-commits] [llvm/llvm-project] 3c4826: [analyzer] Remove pattern matching of lambda captu...

isuckatcs via All-commits all-commits at lists.llvm.org
Mon Aug 22 04:01:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c482632e64c1a3e4967db325562f2e353513abc
      https://github.com/llvm/llvm-project/commit/3c482632e64c1a3e4967db325562f2e353513abc
  Author: isuckatcs <65320245+isuckatcs at users.noreply.github.com>
  Date:   2022-08-22 (Mon, 22 Aug 2022)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
    M clang/test/Analysis/lambdas.cpp

  Log Message:
  -----------
  [analyzer] Remove pattern matching of lambda capture initializers

Prior to this patch we handled lambda captures based on their
initializer expression, which resulted in pattern matching. With
C++17 copy elision the initializer expression can be anything,
and this approach proved to be fragile and a source of crashes.
This patch removes pattern matching and only checks whether the
object is under construction or not.

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




More information about the All-commits mailing list