[PATCH] D79704: [Analyzer] [NFC] Parameter Regions

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 18 06:25:02 PDT 2020


baloghadamsoftware added a comment.

In D79704#2040798 <https://reviews.llvm.org/D79704#2040798>, @NoQ wrote:

> > It turns out that parameter regions are never created for functions without `Decl` because of the first lines in `CallEvent::getCalleeAnalysisDeclContext()`.
>
> Removing these lines is more or less the whole point of your work.


Anyway, when we remove it in a later patch, what should we use for stack frame of the callee? Currently we retrieve the `AnalysisDeclContext` for the `Decl` and then get a stack frame for it. If `Decl` is missing, then we cannot get its `AnalysisDeclContext` either, so how can we get a stack frame? However, currently we need a solution where we can get stack frame for callees with `Decl` but without definition. Since you wrote that this causes crashes because at different points different `Decl`s of the same `ParmVarDecl` are used we created `ParamRegion` that does not store the `Decl` but dynamically retrieves it based on the contents of the actual stack frame.


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

https://reviews.llvm.org/D79704





More information about the cfe-commits mailing list