[PATCH] D147383: [clang-tidy] Allow bugprone-unchecked-optional-access to handle calls to `std::forward`

André Schackier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 1 12:14:36 PDT 2023


AMS21 created this revision.
AMS21 added reviewers: PiotrZSL, njames93, carlosgalvezp.
Herald added a subscriber: xazax.hun.
Herald added a reviewer: NoQ.
Herald added a project: All.
AMS21 requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.

The check now understands that calling `std::forward`
will not modify the underlying optional value.

This fixes llvm#59705


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147383

Files:
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/test/clang-tidy/checkers/bugprone/unchecked-optional-access.cpp
  clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147383.510256.patch
Type: text/x-patch
Size: 5651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230401/490e516c/attachment.bin>


More information about the cfe-commits mailing list