[clang][dataflow] Use NoopLattice in optional model
authorSam Estep <sam@samestep.com>
Wed, 29 Jun 2022 20:10:31 +0000 (20:10 +0000)
committerSam Estep <sam@samestep.com>
Wed, 29 Jun 2022 20:10:42 +0000 (20:10 +0000)
commitcf1f978d319b91464370d71289e1c7c30baa4243
tree881bf78fd0bb2cd7bead33d9421484c86fa12704
parentdcea10c3c6ac963387e53f918c3616b64cb82e8d
[clang][dataflow] Use NoopLattice in optional model

Followup to D128352. This patch pulls the `NoopLattice` class out from the `NoopAnalysis.h` test file into its own `NoopLattice.h` source file, and uses it to replace usage of `SourceLocationsLattice` in `UncheckedOptionalAccessModel`.

Reviewed By: ymandel, sgatev, gribozavr2, xazax.hun

Differential Revision: https://reviews.llvm.org/D128356
clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
clang/docs/tools/clang-formatted-files.txt
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
clang/include/clang/Analysis/FlowSensitive/NoopLattice.h [new file with mode: 0644]
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
clang/unittests/Analysis/FlowSensitive/NoopAnalysis.h