[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 10:12:01 PDT 2020


baloghadamsoftware added a comment.

In D77229#2005413 <https://reviews.llvm.org/D77229#2005413>, @baloghadamsoftware wrote:

>   llvm-project/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:333: clang::ento::ProgramStateRef clang::ento::ExprEngine::createTemporaryRegionIfNeeded(clang::ento::ProgramStateRef, const clang::LocationContext*, const clang::Expr*, const clang::Expr*, const clang::ento::SubRegion**): Assertion `!InitValWithAdjustments.getAs<Loc>() || Loc::isLocType(Result->getType()) || Result->getType()->isMemberPointerType()' failed.
>


For this one I have to increment the `Index` by one if it is a member call. Either at the creation of the region or at getting the type. However, after an hour of research I found no way to determine this for operator calls. An operator call is `CXXOperatorCallExpr` without a method that tells whether it is a member or a non-member operator. This is a problem because `ParmVarDecl::getFunctionScopeIndex()` returns the real index, but `CallExpr::getArg()` takes the "raw" index, where `0` means the implicit `this` argument for member calls.


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

https://reviews.llvm.org/D77229





More information about the cfe-commits mailing list