]> granicus.if.org Git - clang/commitdiff
Updated call to dead stores to use proper arguments.
authorTed Kremenek <kremenek@apple.com>
Fri, 20 Jun 2008 21:55:29 +0000 (21:55 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 20 Jun 2008 21:55:29 +0000 (21:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52560 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/ASTConsumers.cpp

index 580563b05bc31ddcc3c85e3d5e11e74f4a8a331e..92add4195e22e136dcc886b19395980534e9a33b 100644 (file)
@@ -20,6 +20,7 @@
 #include "clang/AST/AST.h"
 #include "clang/AST/ASTConsumer.h"
 #include "clang/AST/CFG.h"
+#include "clang/AST/ParentMap.h"
 #include "clang/Analysis/Analyses/LiveVariables.h"
 #include "clang/Analysis/LocalCheckers.h"
 #include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
@@ -640,7 +641,8 @@ namespace {
     }
     
     virtual void VisitCFG(CFG& C, Decl& CD) {
-      CheckDeadStores(C, *Ctx, Diags);
+      llvm::OwningPtr<ParentMap> PM(new ParentMap(CD.getCodeBody()));
+      CheckDeadStores(C, *Ctx, *PM, Diags);
     }
     
     virtual bool printFuncDeclStart() { return false; }