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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to