kromanenkov created this revision.
kromanenkov added reviewers: zaks.anna, NoQ, dcoughlin.
kromanenkov added subscribers: a.sidorin, cfe-commits.
Add a new type of NonLoc SVal for pointer-to-member operations. This SVal
supports both pointers to member functions and pointers to member data.
htt
kromanenkov added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:2314
{
+ // Return to fulfil assert condition
+ if (location.getAs())
NoQ wrote:
> Hmm. Why would anybody try to load anything from a plain pointer-to-member,
> rather than
kromanenkov added a comment.
ping
https://reviews.llvm.org/D25475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kromanenkov updated this revision to Diff 75020.
kromanenkov added a comment.
Null pointer-to-member dereference is now modeled as UndefinedVal. Fixing this
also releases us from loading from nonloc SVal.
I delete an assertion suppression in ExprEngine::performTrivialCopy because I
can't reprodu
kromanenkov added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462
+ case CK_ReinterpretMemberPointer: {
+const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts();
+assert(isa(UOExpr) &&
dcoughlin wrote:
> dcoughli
kromanenkov updated this revision to Diff 77041.
kromanenkov added a comment.
According to dcoughlin suggestion PointerToMember SVal is now modeled as a
PointerUnion of DeclaratorDecl and bump pointer-allocated object stored
DeclaratorDecl and immutable linked list of CXXBaseSpecifiers.
https: