Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# 54309b1c 20-Dec-2024 Jan Voung <jvoung@google.com>

[clang][dataflow] Add matchers for smart pointer accessors to be cached (#120102)

This is part 1 of caching for smart pointer accessors, building on top
of the CachedConstAccessorsLattice, which ca

[clang][dataflow] Add matchers for smart pointer accessors to be cached (#120102)

This is part 1 of caching for smart pointer accessors, building on top
of the CachedConstAccessorsLattice, which caches "normal" accessors.

Smart pointer accessors are a bit different in that they may:
- have aliases to access the same underlying data (but potentially
returning slightly different types like `&` vs `*`). Within a
"checked" sequence users may mix uses of the different aliases and the
check should apply to any of the spellings.
- may have non-const overloads in addition to the const version, where
the non-const doesn't actually modify the container

Part 2 will follow and add transfer functions utilities. It will also
add a user UncheckedOptionalAccessModel. We'd seen false positives when
nesting StatusOr<optional<T>> and optional<StatusOr<T>>, etc. which this
can help address.

show more ...