[all-commits] [llvm/llvm-project] 54309b: [clang][dataflow] Add matchers for smart pointer a...
Jan Voung via All-commits
all-commits at lists.llvm.org
Fri Dec 20 06:01:35 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 54309b1c2f7a9acdb91ae1735cf4eb0877eadfc0
https://github.com/llvm/llvm-project/commit/54309b1c2f7a9acdb91ae1735cf4eb0877eadfc0
Author: Jan Voung <jvoung at google.com>
Date: 2024-12-20 (Fri, 20 Dec 2024)
Changed paths:
A clang/include/clang/Analysis/FlowSensitive/SmartPointerAccessorCaching.h
M clang/lib/Analysis/FlowSensitive/CMakeLists.txt
A clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp
M clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
A clang/unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list