[lldb] Add unit tests for NonNullSharedPtr (#172173)
I was investigating a crash yesterday that implicated NonNullSharedPtr
which made me realize I didn't add unit tests for my new class.
[-Wunsafe-buffer-usage] Check isValueDependent before EvaluateAsBooleanCondition (#172091)
The function `EvaluateAsBooleanCondition` assumes (asserts) that the
input `Expr` is not in a dependent context. So it is caller's
responsibility to check the condition before the call. This commit fixes
the issue in `UnsafeBufferUsage.cpp`.
The issue was first found downstream because of some code not
upstreamed. This commit also includes those un-upstreamed code.
rdar://166217941
[Clang] [NFC] Add an accessor for `ASTUnit::CodeGenOpts` (#172164)
There is currently no way to actually access `ASTUnit::CodeGenOpts`;
this is almost certainly an oversight, so this adds a getter for it.
[ADT] Only call reserve on empty containers in append_values (#172109)
Calling reserve in a loop can prevent amortized constant time appends
when the container doesn't round up the capacity.
[DebugInfo][DWARF] Allow memory locations in DW_AT_call_target expressions (#171183)
Fixes #70949. Prior to PR #151378 memory locations were incorrect; that
patch prevented the emission of the incorrect locations.
This patch fixes the underlying issue.
[GitHub][CI] Drop manual build of universal-ctags from abi container (#172096)
This package is available in Ubuntu now, so we don't need to build it
manually.
[X86] EltsFromConsecutiveLoads - attempt to match consecutive truncated loads (#172051)
SelectionDAG::areNonVolatileConsecutiveLoads will only match loads that
have a MemoryVT the same size as the stride byte size, which will fail
for cases where large loads have been split (typically by
shift+truncates) and we're trying to stitch them back together.
As a fallback, this patch checks for cases where the candidate element's
byte size is a multiple of full MemoryVT bytes distance away from the base
load.
[libc++][ranges] implement `ranges::elements_of` (#91414)
## Introduction
This patch implements `ranges::elements_of` from
[P2502R2](https://wg21.link/P2502R2). Specializations of `elements_of`
encapsulate a range and act as a tag in overload sets to disambiguate
when a range should be treated as a sequence rather than a single value.
```cpp
template <bool YieldElements>
std::generator<std::any> f(std::ranges::input_range auto &&r) {
if constexpr (YieldElements) {
co_yield std::ranges::elements_of(r);
} else {
co_yield r;
}
}
```
[12 lines not shown]