[clang][dataflow] Replace usage of deprecated functions with the optional check
authorWei Yi Tee <wyt@google.com>
Mon, 19 Sep 2022 16:56:35 +0000 (16:56 +0000)
committerWei Yi Tee <wyt@google.com>
Mon, 19 Sep 2022 17:33:25 +0000 (17:33 +0000)
commit7538b3604519b03d32221cdcc346cc1c181b50fb
treef9df70829ef2e097871bc702d2d6717541ee6842
parent9c3a73a579ca71529fa11dc0e5acee22500e4d10
[clang][dataflow] Replace usage of deprecated functions with the optional check

- Update `transfer` and `diagnose` to take `const CFGElement *` as input in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`.
- Update `clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp` accordingly.
- Rename `runDataflowAnalysisOnCFG` to `runDataflowAnalysis` and remove the deprecated `runDataflowAnalysis` (this was only used by the now updated optional check).

Reviewed By: gribozavr2, sgatev

Differential Revision: https://reviews.llvm.org/D133930
clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp