baloghadamsoftware added a comment. This is an alternative approach to D79704 <https://reviews.llvm.org/D79704>. The advantage is that we must not duplicate code everywhere where `VarRegion` (and sometimes also `DeclRegion`) is used. The drawback is that after we implement handling of parameters of functions without `Decl` (paramters of unknown functions passed by pointer) the `getDecl()` method may return `nullptr`. We must handle this case everywhere in the code where `VarRegion` or `DeclRegion` is used and parameters of such functions may appear. (We should do this in the original apprach as well, but there it is more difficult to forget such a place because `ParamRegion` is used explicitly. Furthermore, where handling of `ParamRegion` is completely forgotten we usually do not crash, but if we forget to check the result of `getDecl()` for `nullptr` we get null pointer dereferences.)
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80522/new/ https://reviews.llvm.org/D80522 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits