[all-commits] [llvm/llvm-project] 6761b2: [clang][dataflow] Cache accessors for bugprone-unc...
Jan Voung via All-commits
all-commits at lists.llvm.org
Tue Oct 22 07:18:44 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6761b24ae2f34b923df46412475a9ece50542b97
https://github.com/llvm/llvm-project/commit/6761b24ae2f34b923df46412475a9ece50542b97
Author: Jan Voung <jvoung at google.com>
Date: 2024-10-22 (Tue, 22 Oct 2024)
Changed paths:
M clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst
M clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
M clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
M clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp
Log Message:
-----------
[clang][dataflow] Cache accessors for bugprone-unchecked-optional-access (#112605)
Treat calls to zero-param const methods as having stable return values
(with a cache) to address issue #58510. The cache is invalidated when
non-const methods are called. This uses the infrastructure from PR
#111006.
For now we cache methods returning:
- ref to optional
- optional by value
- booleans
We can extend that to pointers to optional in a next change.
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