r324053 - [analyzer] Fix transitions in check::PreStmt<MemberExpr> checker callback.
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 18:23:37 PST 2018
Author: dergachev
Date: Thu Feb 1 18:23:37 2018
New Revision: 324053
URL: http://llvm.org/viewvc/llvm-project?rev=324053&view=rev
Log:
[analyzer] Fix transitions in check::PreStmt<MemberExpr> checker callback.
No in-tree checkers use this callback so far, hence no tests. But better fix
this now than remember to fix this when the checkers actually appear.
Patch by Henry Wong!
Differential Revision: https://reviews.llvm.org/D42785
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=324053&r1=324052&r2=324053&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Thu Feb 1 18:23:37 2018
@@ -2251,16 +2251,15 @@ void ExprEngine::VisitMemberExpr(const M
ExplodedNodeSet CheckedSet;
getCheckerManager().runCheckersForPreStmt(CheckedSet, Pred, M, *this);
- ExplodedNodeSet EvalSet;
- ValueDecl *Member = M->getMemberDecl();
+ ExplodedNodeSet EvalSet;
+ ValueDecl *Member = M->getMemberDecl();
// Handle static member variables and enum constants accessed via
// member syntax.
- if (isa<VarDecl>(Member) || isa<EnumConstantDecl>(Member)) {
- ExplodedNodeSet Dst;
+ if (isa<VarDecl>(Member) || isa<EnumConstantDecl>(Member)) {
for (ExplodedNodeSet::iterator I = CheckedSet.begin(), E = CheckedSet.end();
I != E; ++I) {
- VisitCommonDeclRefExpr(M, Member, Pred, EvalSet);
+ VisitCommonDeclRefExpr(M, Member, *I, EvalSet);
}
} else {
StmtNodeBuilder Bldr(CheckedSet, EvalSet, *currBldrCtx);
More information about the cfe-commits
mailing list