[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

weiyi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 18 10:37:03 PDT 2022


wyt created this revision.
Herald added subscribers: martong, xazax.hun.
Herald added a project: All.
wyt requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

- Add `AnalysisArguments` struct for `checkDataflow`.

- Remove compulsory binding from statement to annotations. Instead, `checkDataflow` in the most general form takes a `VerifyResults` callback which takes as input an `AnalysisData` struct. This struct contains the data structures generated by the analysis that can then be tested. We then introduce two overloads/wrappers of `checkDataflow` for different mechanisms of testing - one which exposes annotation line numbers and is not restricted to statements, and the other which exposes states computed after annotated statements. In the future, we should look at retrieving the analysis states for constructs other than statements.

Depends On D131616 <https://reviews.llvm.org/D131616>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132147

Files:
  clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
  clang/unittests/Analysis/FlowSensitive/TestingSupport.h
  clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132147.453705.patch
Type: text/x-patch
Size: 23924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220818/be7637d0/attachment-0001.bin>


More information about the cfe-commits mailing list