[PATCH] D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member

Deep Majumder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 10:29:35 PST 2021


RedDocMD created this revision.
RedDocMD added reviewers: vsavchenko, NoQ, dcoughlin.
Herald added subscribers: steakhal, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
RedDocMD requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

If the cast is to a class such that it is possible to reach the correct
sub-object containing the pointed member, a path to that class is
discovered via BFS. This path is used to construct the new
pointer-to-member data. If there is no such path, the resulting node is
not analyzed further.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96976

Files:
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
  clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
  clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
  clang/test/Analysis/reinterpret-cast-pointer-to-member.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96976.324698.patch
Type: text/x-patch
Size: 7969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210218/9186f201/attachment-0001.bin>


More information about the cfe-commits mailing list