[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

Sam Estep via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 11:47:17 PDT 2022


samestep added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76
 
+class UncheckedOptionalAccessDiagnosis {
+public:
----------------
samestep wrote:
> sgatev wrote:
> > samestep wrote:
> > > samestep wrote:
> > > > sgatev wrote:
> > > > > Move this to a new UncheckedOptionalAccessDiagnosis.(h,cpp)?
> > > > OK! I'll do that next.
> > > Actually, @sgatev would that go under `FlowSensitive/Models/` or just under `FlowSensitive/`?
> > I suggest keeping it under `FlowSensitive/Models/` for now. We can change that at a later point if there's a better alternative.
> Where should I put the `UncheckedOptionalAccessModelOptions` type and `ignorableOptional` function that need to be shared between both the model and the diagnosis?
Same question for the following other helper functions:

- `hasOptionalType`
- `isOptionalMemberCallWithName`
- `isOptionalOperatorCallWithName`

Given how much code is shared between the two, I'm really not sure whether it's the best idea to move this into a separate file in this patch...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127898/new/

https://reviews.llvm.org/D127898



More information about the llvm-commits mailing list