Adds a dataflow analysis that detects unsafe accesses to values of type
std::optional, absl::optional, or base::Optional.
Also moves TestingSupport.h|cc out of the unittest directory so that it
can be used by model tests.
Paths
| Differential D121197
[clang][dataflow] Add analysis that detects unsafe accesses to optionals ClosedPublic Authored by sgatev on Mar 8 2022, 1:57 AM.
Details Summary Adds a dataflow analysis that detects unsafe accesses to values of type Also moves TestingSupport.h|cc out of the unittest directory so that it
Diff Detail
Event TimelineComment Actions Maybe add explanation to the patch description for move of TestingSupport.h? Also, mention that this just a core implementation, and fuller support is coming?
sgatev added inline comments.
This revision is now accepted and ready to land.Mar 8 2022, 10:06 AM xazax.hun added inline comments.
sgatev marked 2 inline comments as done. Comment ActionsAddress reviewers' comments.
This revision was landed with ongoing or failed builds.Mar 9 2022, 1:45 AM Closed by commit rGce205cffdfa0: [clang][dataflow] Add analysis that detects unsafe accesses to optionals (authored by sgatev). · Explain Why This revision was automatically updated to reflect the committed changes. sgatev added a reverting change: rGe0cc28dfdc67: Revert "[clang][dataflow] Add analysis that detects unsafe accesses to….Mar 9 2022, 1:51 AM Comment Actions
Thanks for spotting that! I'll prepare a patch to fix it.
Revision Contents
Diff 413737 clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
clang/include/clang/Analysis/FlowSensitive/TestingSupport.h
clang/lib/Analysis/FlowSensitive/CMakeLists.txt
clang/lib/Analysis/FlowSensitive/Models/CMakeLists.txt
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
clang/lib/Analysis/FlowSensitive/TestingSupport.cpp
clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
clang/unittests/Analysis/FlowSensitive/MatchSwitchTest.cpp
clang/unittests/Analysis/FlowSensitive/Models/CMakeLists.txt
clang/unittests/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModelTest.cpp
clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
clang/unittests/Analysis/FlowSensitive/TestingSupport.h
clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
clang/unittests/Analysis/FlowSensitive/TestingSupportTest.cpp
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
|
Delete?