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

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 24 08:00:13 PDT 2020


baloghadamsoftware added a comment.

The big question to decide: Either we keep `ParamRegion` as a separate region in the class hierarchy and at the few places where `DeclRegion` or `VarRegion` is used and parameters are possible we duplicate the few lines. (Current status.)

The other way is to remove `Decl` from `DeclRegion` and make `getDecl()` pure virtual. Also we split `VarRegion` into two subclasses, one of the is the non-parameter variable regions and the other is `ParamVarRegion`. The first one stores the `Decl`, the second one calculates it. This saves code duplication, however after we implement creation of stack frames for calls without `Decl` we must update all the code using `DeclRegion` and `VarRegion` where parameters are possible to handle `nullptr` as return value for `getDecl()`.

@NoQ, please decide, which way to go.


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

https://reviews.llvm.org/D79704





More information about the cfe-commits mailing list