LLVM/project 516266a — llvm/lib/Target/RISCV RISCVFrameLowering.h RISCVFrameLowering.cpp, llvm/test/CodeGen/RISCV shrinkwrap.ll

[RISCV][CFI] Implement resetCFIToInitialState for RISCVFrameLowering (#245548)

RISCVFrameLowering enables `CFIFixup` but left
`resetCFIToInitialState()` as a no-op, leaving stale CFA offsets and
callee-saved register rules active when transitioning from a framed
block to a frameless block.

Override `resetCFIToInitialState()` to reset the CFA to SP + 0 and emit
`.cfi_same_value` for callee-saved registers, updating affected test
expectations.

Close #240683
DeltaFile
+29-0llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+5-0llvm/test/CodeGen/RISCV/shrinkwrap.ll
+2-0llvm/lib/Target/RISCV/RISCVFrameLowering.h
+36-03 files

LLVM/project d4f69e3 — clang/lib/Parse ParsePragma.cpp

[clang] Validate vectorize_width state after consuming its identifier
DeltaFile
+11-10clang/lib/Parse/ParsePragma.cpp
+11-101 files

LLVM/project 889c8c5 — mlir/include/mlir/Dialect/LLVMIR NVVMArithOps.h NVVMEnums.td, mlir/lib/Dialect/LLVMIR/IR NVVMArithOps.cpp

[MLIR][NVVM] Add compare and set Op (#247175)

This patch adds the compare and set Op which perform comparison 
and return boolean vector mask of 1's or 0's.
Lit tests are added to verify the lowering to the intrinsics. 

PTX ISA Reference:
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-set

Assisted-by: Claude Code

---------

Signed-off-by: DharuniRAcharya <dharunira at nvidia.com>
DeltaFile
+169-0mlir/test/Target/LLVMIR/nvvm/compare-and-set.mlir
+43-0mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+23-0mlir/include/mlir/Dialect/LLVMIR/NVVMEnums.td
+12-0mlir/lib/Dialect/LLVMIR/IR/NVVMArithOps.cpp
+1-0mlir/include/mlir/Dialect/LLVMIR/NVVMArithOps.h
+248-05 files

LLVM/project fffde78 — llvm/lib/Transforms/Coroutines CoroSplit.cpp CoroAnnotationElide.cpp, llvm/unittests/Analysis CGSCCPassManagerTest.cpp

[NFC][CallGraphUpdater] Remove unused includes and instances (#247897)
DeltaFile
+0-5llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
+0-3llvm/lib/Transforms/Coroutines/CoroAnnotationElide.cpp
+0-1llvm/unittests/Transforms/IPO/AttributorTestBase.h
+0-1llvm/unittests/IR/LegacyPassManagerTest.cpp
+0-1llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+0-115 files

LLVM/project 75d5905 — clang/tools/clang-fuzzer/handle-llvm handle_llvm.cpp, clang/tools/clang-nvlink-wrapper ClangNVLinkWrapper.cpp

[clang] Remove unused includes (NFC) (#247478)

This patch removes unused #include directives across .cpp files under
clang/tools/ and clang/utils/.  Identified by clang-include-cleaner and
verified locally.

Assisted-by: Antigravity
DeltaFile
+0-12clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
+0-8clang/tools/clang-ssaf-format/SSAFFormat.cpp
+0-4clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
+0-3clang/tools/clang-nvlink-wrapper/ClangNVLinkWrapper.cpp
+0-2clang/tools/libclang/CXString.cpp
+0-2clang/tools/libclang/CXStoredDiagnostic.cpp
+0-3119 files not shown
+0-5925 files

LLVM/project a2559f9 — llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port f59521e7ec81 (#247905)
DeltaFile
+2-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+2-01 files

LLVM/project 9fb9b5d — llvm/utils/gn/secondary/clang-tools-extra/clang-doc BUILD.gn

[gn build] Port ac1c9a26517a (#247904)
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-doc/BUILD.gn
+1-01 files

LLVM/project 4619c8b — utils/bazel/llvm-project-overlay/openmp/runtime/src BUILD.bazel

[bazel] Add -lrt to openmp (#247866)

When using the hermetic toolchain, which targets glibc 2.28 by default,
this is required. It doesn't hurt newer glibc versions
DeltaFile
+3-0utils/bazel/llvm-project-overlay/openmp/runtime/src/BUILD.bazel
+3-01 files

LLVM/project d394c04 — llvm/utils/gn/secondary/llvm/lib/Target/Hexagon BUILD.gn

[gn build] Port 5c5723624955 (#247903)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/Hexagon/BUILD.gn
+1-01 files

LLVM/project 5e3ec1b — llvm/utils/gn/secondary/llvm/tools/llvm-cov BUILD.gn

[gn build] Port 0f7957afa2bc (#247902)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/tools/llvm-cov/BUILD.gn
+1-01 files

LLVM/project 168cf18 — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-user.f90

Rank an omitted directive like an explicit NOTHING

A WHEN clause that omits its directive was ranked without its runtime
condition, and the unguarded candidate of a match_any WHEN clause kept
only the condition's key. To still see the condition, isStrictSubset
counted a key without a condition trait as that trait, whatever its
polarity, and an omitted match_any clause whose static traits don't
match lost both its traits and its key. So, unlike an explicit NOTHING:
- An omitted match_none clause with `condition(a)` made a selector with
  `condition(a)` a strict subset of it, although it requires `a` to be
  false.
- An omitted match_any clause with `vendor(gnu)` didn't make a selector
  with the same condition a strict subset of it.
- An omitted clause lost its condition's score.

Build an omitted directive's candidates the same way as an explicit
NOTHING; explicitness still only breaks ties. The unguarded candidate
of a match_any WHEN clause keeps the condition trait without its score,
so every runtime condition key now comes with a condition trait, and

    [5 lines not shown]
DeltaFile
+98-0flang/test/Lower/OpenMP/metadirective-user.f90
+19-29flang/lib/Semantics/openmp-utils.cpp
+2-41llvm/unittests/Frontend/OpenMPContextTest.cpp
+10-24llvm/lib/Frontend/OpenMP/OMPContext.cpp
+2-1llvm/include/llvm/Frontend/OpenMP/OMPContext.h
+131-955 files

LLVM/project 42de2e0 — llvm/lib/Target/AMDGPU GCNSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU schedule-spill-check-effective-occupancy.mir

[AMDGPU] Respect retained occupancy when comparing schedules

The scheduler can discard a schedule that spills fewer registers
because it compares occupancy beyond what the function can retain.
Cap both pressure comparisons at the function's retained occupancy.

A synthetic gfx1200 kernel spills 16 SGPRs instead of 32 at the same
two-wave limit.

AI assisted.
DeltaFile
+112-0llvm/test/CodeGen/AMDGPU/schedule-spill-check-effective-occupancy.mir
+5-2llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+117-22 files

LLVM/project 0084b89 — llvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN/PRE pre-basic-add.ll

[GVN] Treat DeadBlocks as poison

Same as PRE load, a deadblock should not be treated as something need
insertion. Insert poision for this.
DeltaFile
+70-0llvm/test/Transforms/GVN/PRE/pre-basic-add.ll
+4-0llvm/lib/Transforms/Scalar/GVN.cpp
+74-02 files

LLVM/project bb6c594 — compiler-rt/lib/fuzzer FuzzerUtilPosix.cpp FuzzerUtil.h, compiler-rt/test/fuzzer windows-immediate-exit-dll-detach.test WindowsImmediateExitDllDetachTest.cpp

[libFuzzer] Use TerminateProcess for immediate exits on Windows (#247877)

On Windows, `_Exit()` calls `ExitProcess()`, which kills all other threads
and then runs `DllMain(DLL_PROCESS_DETACH)` for every loaded DLL while
holding the loader lock. libFuzzer often exits from a non-main thread
(timeout, RSS limit, or crash handler). If a DLL's detach handler waits on a
lock or a thread that was already killed, the process hangs instead of
exiting. We saw this on ClusterFuzz after `SUMMARY: libFuzzer: timeout`.

Add `ExitImmediately()`, which uses `TerminateProcess()` on Windows to skip
DLL detach, the same way as `internal__exit()` in sanitizer_common. Other
platforms still use `_Exit()`. Use it for all existing `_Exit()` calls in
libFuzzer.

Assisted-by: Gemini
DeltaFile
+44-0compiler-rt/test/fuzzer/WindowsImmediateExitDllDetachTest.cpp
+13-11compiler-rt/lib/fuzzer/FuzzerLoop.cpp
+18-0compiler-rt/test/fuzzer/windows-immediate-exit-dll-detach.test
+10-0compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+4-0compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
+4-0compiler-rt/lib/fuzzer/FuzzerUtil.h
+93-112 files not shown
+97-128 files

LLVM/project cc89e39 — llvm/test/CodeGen/AMDGPU si-fix-sgpr-copies-phi-agpr-use.mir

[AMDGPU][NFC] Precommit test for SIFixSGPRCopies PHI-to-AGPR rewrite (#247814)

`processPHINode` moves a VGPR PHI to an AGPR class when all of its uses
are copies to AGPRs. A `DBG_VALUE` use of the PHI blocks the move, so
the class depends on `-g`.

The checks show the current behavior: the PHIs in `phi_agpr_use` and
`phi_agpr_use_64` become `agpr_32` and `areg_64_align2`, while the one
in `phi_agpr_use_dbg_value` stays `vgpr_32`.

This came up in the review of #245761.

Assisted-by: Claude Opus 5.5

---------

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Co-authored-by: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
DeltaFile
+188-0llvm/test/CodeGen/AMDGPU/si-fix-sgpr-copies-phi-agpr-use.mir
+188-01 files

LLVM/project ef20036 — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-user.f90

Keep the condition key when a WHEN clause omits its directive

A WHEN clause that omits its directive is ranked without its condition,
and only its match_any unguarded candidate kept the condition's key.
Otherwise its selector lost the condition, so with

```
  !$omp metadirective when(user={condition(b)}: taskyield) &
  !$omp& when(user={condition(.true.)}, implementation={vendor(llvm)}: taskwait) &
  !$omp& when(user={condition(b)}, implementation={vendor(llvm)}:)
```

the first selector wasn't a strict subset of the third, and TASKYIELD
was selected when `b` is true. Keep the key whenever the static traits
match, and let the key stand for the condition trait when it was left
out of the other selector's traits. The first selector then scores
zero, the explicit TASKWAIT wins the tie with the implicit NOTHING, and
TASKWAIT is always selected, as with an explicit NOTHING.


    [7 lines not shown]
DeltaFile
+37-24flang/test/Lower/OpenMP/metadirective-user.f90
+14-4llvm/lib/Frontend/OpenMP/OMPContext.cpp
+5-7flang/lib/Semantics/openmp-utils.cpp
+11-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+67-354 files

LLVM/project f69b46c — llvm/lib/Frontend/OpenMP OMPContext.cpp, llvm/unittests/Frontend OpenMPContextTest.cpp

Only compare tied variants that share a runtime condition

Each tied variant was compared with every other tied variant until a
strict superset was found, trying the supersets found so far first.
When each superset has a different runtime condition, the cache never
hits, so a selection is quadratic in the number of tied variants, and
Flang selects repeatedly to build the ELSE chain. With 160 TASKYIELD
clauses with conditions `x(i)` followed by 160 TASKWAIT clauses with
the same conditions and `kind(cpu)`, MLIR generation took 3.3s instead
of 0.5s before this PR.

A variant with a runtime condition can only be a strict subset of one
with the same condition, so group the tied variants by condition and
scan only that group, keeping the cache per group. A variant without a
runtime condition still scans every tied variant. The example now takes
0.64s.

Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
DeltaFile
+23-11llvm/lib/Frontend/OpenMP/OMPContext.cpp
+7-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+30-112 files

LLVM/project 74c27ca — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-user.f90

Keep the condition key when a match_any WHEN clause omits its directive

The unguarded candidate of a match_any WHEN clause keeps its condition
key when the clause has a directive, but not when it omits one. A
selector with a key is then never a strict subset of one without, so
with

```
  !$omp metadirective &
  !$omp& when(user={condition(a)}, &
  !$omp&      implementation={vendor(score(4): llvm), extension(match_any)}: &
  !$omp&      taskwait) &
  !$omp& when(user={condition(a)}, device={kind(host)}, &
  !$omp&      implementation={vendor(score(3): llvm), extension(match_any)}:)
```

TASKWAIT was also selected when `a` is false. Give both unguarded
candidates the key, so the first is again a strict subset of the second
and nothing is selected when `a` is false.

    [9 lines not shown]
DeltaFile
+60-0flang/test/Lower/OpenMP/metadirective-user.f90
+8-2flang/lib/Semantics/openmp-utils.cpp
+68-22 files

LLVM/project c92ab64 — flang/test/Lower/OpenMP metadirective-user.f90

Add a three-way runtime condition tie to the tests

The first WHEN clause is a strict subset of the third, which ties with the
second. Clause order then tests `b` first, and TASKYIELD is never
selected.
DeltaFile
+29-0flang/test/Lower/OpenMP/metadirective-user.f90
+29-01 files

LLVM/project 4595c9b — flang/test/Lower/OpenMP metadirective-user.f90, llvm/unittests/Frontend OpenMPContextTest.cpp

Test ISA names against a retained condition key

A retained condition key counts as a trait, so it can make a selector
require more traits than one with different ISA names. isStrictSubset
now compares the ISA names in that case too, so with

```
  !$omp metadirective &
  !$omp& when(device={isa("sse4")}, &
  !$omp&      implementation={vendor(llvm), extension(match_any)}: taskwait) &
  !$omp& when(user={condition(a)}, device={isa("avx")}, &
  !$omp&      implementation={vendor(llvm), extension(match_any)}: taskyield)
```

TASKWAIT is always selected, as when `a` is true. Test this case.

Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
DeltaFile
+17-0flang/test/Lower/OpenMP/metadirective-user.f90
+9-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+26-02 files

LLVM/project a46cc35 — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-user.f90

Fold logical user conditions of any kind

EvaluateUserCondition only folded default-kind logicals, so a condition
like .false._8 stayed a runtime check. getConditionKey folded it on its
own and gave it the empty key of a constant, so the WHEN clause was
ranked like a true constant although it can never apply.
EvaluateUserCondition now folds logical constants of any kind, and
getConditionKey only sees runtime conditions.

The tests that expected a constant of another kind to stay a runtime
check now expect it to be resolved statically.
DeltaFile
+39-32flang/test/Lower/OpenMP/metadirective-user.f90
+2-5flang/lib/Semantics/openmp-utils.cpp
+41-372 files

LLVM/project 185eb8f — flang/test/Lower/OpenMP metadirective-user.f90

Check that TASKYIELD is unconditional in the match_any tests
DeltaFile
+4-4flang/test/Lower/OpenMP/metadirective-user.f90
+4-41 files

LLVM/project 20df0f4 — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-user.f90

Count a retained runtime condition in the strict-subset check

The unguarded candidate of a match_any WHEN clause keeps its condition
key but not the condition trait, so it had one trait fewer than an
identical guarded candidate and counted as its strict subset. A key
without a trait now counts as a trait. A WHEN clause with an omitted
directive is ranked without its condition, so it no longer gets a key.
DeltaFile
+21-16llvm/lib/Frontend/OpenMP/OMPContext.cpp
+20-0flang/test/Lower/OpenMP/metadirective-user.f90
+11-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+2-1flang/lib/Semantics/openmp-utils.cpp
+54-174 files

LLVM/project 0cc25d8 — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-user.f90

[flang][OpenMP] Don't treat different runtime conditions as subsets

When two METADIRECTIVE candidates have the same score and one selector is
a strict subset of the other, the superset wins. Flang ranks every
runtime condition with the same property, so isStrictSubset saw
different conditions as the same:

  !$omp metadirective &
  !$omp& when(user={condition(a)}, &
  !$omp&      implementation={vendor(score(4): llvm)}: taskyield) &
  !$omp& when(user={condition(b)}, device={kind(host)}, &
  !$omp&      implementation={vendor(score(3): llvm)}: taskwait)

Both candidates score 5, and `b` was tested first, so TASKWAIT ran when
both conditions were true. Neither selector is a subset of the other, so
clause order should decide.

This patch adds a UserCondition key to VariantMatchInfo, and
isStrictSubset requires equal keys when the first selector has a

    [14 lines not shown]
DeltaFile
+224-0flang/test/Lower/OpenMP/metadirective-user.f90
+41-3flang/lib/Semantics/openmp-utils.cpp
+37-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+7-0llvm/lib/Frontend/OpenMP/OMPContext.cpp
+4-0llvm/include/llvm/Frontend/OpenMP/OMPContext.h
+313-35 files

LLVM/project e634d61 — flang/include/flang/Evaluate expression.h, flang/lib/Evaluate expression.cpp variable.cpp

[flang][OpenMP] Compare complex parts and literal substrings by value

Expr equality had two gaps:
- ComplexComponent inherited Operation::operator==, which ignores
  isImaginaryPart, so `real(z)` and `aimag(z)` compared equal.
- Substring compared literal parents by StaticDataObject::Pointer, so
  substrings of identical literals, such as `'ab'(i:i)`, never compared
  equal.

METADIRECTIVE lowering turns `user={condition(...)}` selectors into an
IF/ELSE chain. Since a condition is false on its ELSE path, Flang drops
the other candidates with the same condition there, using Expr equality
to compare them.

The first gap drops a different condition:

```
  !$omp metadirective &
  !$omp& when(user={condition(real(z) > 0.0)}: taskyield) &

    [26 lines not shown]
DeltaFile
+36-0flang/test/Lower/OpenMP/metadirective-user.f90
+24-0flang/unittests/Evaluate/expression.cpp
+12-2flang/lib/Evaluate/variable.cpp
+4-0flang/lib/Evaluate/expression.cpp
+1-0flang/include/flang/Evaluate/expression.h
+77-25 files

LLVM/project 29fbad9 — flang/test/Lower/OpenMP metadirective-user.f90, llvm/lib/Frontend/OpenMP OMPContext.cpp

Compare the condition of an unguarded match_any candidate

A match_any WHEN clause with a runtime condition also gets a candidate
without the condition, since its other traits can still match. That
candidate has no condition trait, so isStrictSubset skipped the key
check, and it became a subset of a WHEN clause with a different
condition. The key is now compared whenever it is set.
DeltaFile
+35-0flang/test/Lower/OpenMP/metadirective-user.f90
+14-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+3-0llvm/lib/Frontend/OpenMP/OMPContext.cpp
+52-03 files

LLVM/project e05e460 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/AArch64 hadd-combine.ll

[DAG] combineShiftToAVG - match sub(A, not(B)) as avgceil

A - ~B == A + B + 1. DAGCombiner turns add(add(A, B), 1) into
sub(A, not(B)) if preferIncOfAddToSubOfNot is false, as on X86 for
multi-element vectors and on AArch64 for all vectors. D148809 delays
this until after legalization if the add of 1 has nuw or nsw.
combineShiftToAVG does not recognize the sub form, so the ceil average
is lost if the fold runs first. Match the sub form as well. If the not
has other users, only do it when the AVG node is legal or custom.

This shows up when the IR is written as a sub of a not, or when a
freeze is pushed through the adds and drops their flags. With #152107
the latter loses vpavgb/vpavgw in five AVX512F maskz tests of
avg-mask.ll, which match main again with this change.

Where the target expands the AVG node, the sub form now gets the code
of the add form, e.g. on RISC-V P, which has AVGSUBFLOOR but no
AVGCEIL, and for some Hexagon and ARM NEON types.

Assisted-by: Claude Code (Claude Opus 5.5)
DeltaFile
+62-325llvm/test/CodeGen/X86/avg.ll
+36-26llvm/test/CodeGen/AArch64/hadd-combine.ll
+30-8llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+128-3593 files

LLVM/project d95231e — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize vplan-based-stride-mv.ll

Workaround inifinite loop
DeltaFile
+115-8llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+9-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-2llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+125-113 files

LLVM/project 3be2b6c — llvm/lib/Target/X86 X86FastPreTileConfig.cpp X86PreTileConfig.cpp, llvm/test/CodeGen/X86/ACEV1 acev1-config-resets-bsr.ll acev1-bsr-config-order.ll

[X86][ACEV1] Keep a tile config from resetting a written BSR

ldtilecfg runs bsr_init(), so a config the compiler places between a
BSR write and a read of that value throws the scales away. The config
cannot move above the write, because a call makes it volatile and -O0
puts one at the head of every block that uses tiles.

Mark the configs as writing bsr0, give BSR0 a register class so a
spill has a size, and preserve the value across the configs that
reach a read. Memory forms exist both ways, so this costs four
instructions.

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+174-0llvm/test/CodeGen/X86/ACEV1/acev1-bsr-config-order.ll
+100-0llvm/lib/Target/X86/X86MachineFunctionInfo.cpp
+36-0llvm/test/CodeGen/X86/ACEV1/acev1-config-resets-bsr.ll
+20-0llvm/lib/Target/X86/X86InstrInfo.cpp
+14-5llvm/lib/Target/X86/X86PreTileConfig.cpp
+13-1llvm/lib/Target/X86/X86FastPreTileConfig.cpp
+357-64 files not shown
+380-810 files

LLVM/project 7eae833 — clang/lib/Analysis/FlowSensitive DataflowEnvironment.cpp, clang/unittests/Analysis/FlowSensitive DataflowEnvironmentTest.cpp

Fix a crash in handling this-pointer captured in nested lambdas in field initializer. (#245491)

Environment.initialize() currently crashes when handling a this-pointer
captured by a nested lambda expression appearing in a field initializer
of a struct. Consider the following example:

```cpp
struct {
  int f = int f{[this]() { return [this]() { return 1; }(); }()};
}
```

When handling the this-pointer captured in the inner lambda,
Environment.initialize() tries to get the enclosing record by calling
getLambdaContext() on the lambda's Closure. However, getLambdaContext()
only works for the outermost lambda. For inner lambdas, it just returns
nullptr, which causes a null-dereference.

This PR fixes that issue by introducing a helper function that finds the
outermost lambda and get getLambdaContextDecl() from it.
DeltaFile
+74-0clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
+22-1clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+96-12 files