[LifetimeSafety] Add suggestion and inference for implicit this (#176703)
This PR implements support for automatically suggesting and inferring
`[[clang::lifetimebound]]` annotations for the implicit `this`.
The analysis now models the implicit this object as an implicit
parameter that carries a "placeholder loan" from the caller's scope. By
tracking this loan through the method body, the analysis can identify if
this reaches an escape point, such as a return statement.
Key Changes:
- Updated `PlaceholderLoan` to hold a union of `ParmVarDecl*` and
`CXXMethodDecl*`
- Extended `OriginManager` to handle `CXXThisExpr` and create a
dedicated origin list for the implicit this parameter
- Modified `FactsGenerator::issuePlaceholderLoans` to create a
placeholder loan for this at the entry of non-static member functions
- Updated `implicitObjectParamIsLifetimeBound` in
`LifetimeAnnotations.cpp` to check for the attribute on the method
[32 lines not shown]
[RISCV] Run combineOrToBitfieldInsert after DAG legalize (#177830)
Not combing `OR` into `QC.INSB(I)` before DAG legalization helps known
bits analysis to simplify the code if possible.
modules: efirt: Fix standalone build
This is extracted from change [1] which is not MFCed. This is a direct
commit to stable/14 branch.
[1] f840492b5b0d efidev: add support for memory attribute
sys/modules: fix standalone build for multiple modules
Multiple Makefile miss opt_*.h and *_if.h header file. We fix it by
running make in sys/modules to build all modules.
MFC note: this is a partial MFS to stable/14, as modules/etherswitch,
modules/miiproxy and modules/nvmf do not exist in stable/14.
Approved by: lwhsu (mentor), markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52062
(cherry picked from commit 8a847947153e60d812852e5c02de93997b2d3038)
Update to quiche 0.24.8
Patch out qlog-dancer in Cargo.toml, as it has dependencies (checkout
on specific GH commit) that MODCARGO_CRATES does not seem to handle,
plus we do not need it anyway.
[include-cleaner] Update main-file checking in htmlreport generation
We updated how walkUsed decides if a location belongs to mainfile in
51ee583b1a02b6a4dce86dbe36af91ec60d45137 but forgot to update html
report generation.
[lldb] Fix error when running "memory region --all" repeatedly (#177176)
Due to some faulty logic, if you ran "memory region --all" twice, the
second time lldb would try to repeat the command. There's nothing to
repeat, so it failed with an error. It should treat each "--all" use as
starting from scratch.
The logic here was written in a confusing way, so I've refactored it to
first look at how many arguments there are (aka how many address
expressions there are) and then validate based on that.
For reasons unknown, I could not reproduce this issue using the API test
TestMemoryRegion.py. So I have added a shell test that I confirmed does
fail without this fix.