[PATCH] D95307: [StaticAnalyzer] Add checking for degenerate base class in MemRegion

Deep Majumder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 26 06:27:06 PST 2021


RedDocMD added a comment.

On further digging as to how pointer-to-members are handled in StaticAnalyzer, I discovered that in `BasicValueFactory::accumCXXBase() for the example given in my test produces the two `CXXBaseSpecifier` for the pointer-to-member. At line 195, one base specifier is added while the other is added in the loop in 201. The loop accounts for the static_cast while line 195 adds a base specifier from the expression being cast. 
This causes the duplication. I will try to update this patch to handle the duplication.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95307



More information about the cfe-commits mailing list