[PATCH] D42785: [Analyzer] Fix a typo in `ExprEngine::VisitMemberExpr`

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 18:25:43 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL324053: [analyzer] Fix transitions in check::PreStmt<MemberExpr> checker callback. (authored by dergachev, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D42785

Files:
  cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp


Index: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -2251,16 +2251,15 @@
   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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42785.132526.patch
Type: text/x-patch
Size: 1057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180202/43923f6d/attachment.bin>


More information about the llvm-commits mailing list