blob: a6c0ea3154e8a64f1ae2555f41d0748c434b6b4c [file] [log] [blame]
Ted Kremenek56b1f712011-01-13 20:58:56 +00001//==- DeadStoresChecker.cpp - Check for stores to dead variables -*- C++ -*-==//
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +00002//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner0bc735f2007-12-29 19:59:25 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +00007//
8//===----------------------------------------------------------------------===//
9//
Gabor Greif843e9342008-03-06 10:40:09 +000010// This file defines a DeadStores, a flow-sensitive checker that looks for
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +000011// stores to variables that are no longer live.
12//
13//===----------------------------------------------------------------------===//
14
Ted Kremenek21142582010-12-23 19:38:26 +000015#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h"
Ted Kremenekcf6e41b2007-12-21 21:42:19 +000016#include "clang/Analysis/Analyses/LiveVariables.h"
Ted Kremenekfdd225e2007-09-25 04:31:27 +000017#include "clang/Analysis/Visitors/CFGRecStmtVisitor.h"
Ted Kremenek9b663712011-02-10 01:03:03 +000018#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
19#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
Ted Kremenekf96f16d2009-04-07 05:25:24 +000020#include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h"
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +000021#include "clang/Basic/Diagnostic.h"
Ted Kremenekce1cab92007-09-11 17:24:14 +000022#include "clang/AST/ASTContext.h"
Ted Kremenek1a654b62008-06-20 21:45:25 +000023#include "clang/AST/ParentMap.h"
Ted Kremenekf96f16d2009-04-07 05:25:24 +000024#include "llvm/ADT/SmallPtrSet.h"
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +000025
26using namespace clang;
Ted Kremenek9ef65372010-12-23 07:20:52 +000027using namespace ento;
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +000028
29namespace {
Ted Kremenek1a654b62008-06-20 21:45:25 +000030
Ted Kremenek848ec832011-02-11 23:24:26 +000031// FIXME: Eventually migrate into its own file, and have it managed by
32// AnalysisManager.
33class ReachableCode {
34 const CFG &cfg;
35 llvm::BitVector reachable;
36public:
37 ReachableCode(const CFG &cfg)
38 : cfg(cfg), reachable(cfg.getNumBlockIDs(), false) {}
39
40 void computeReachableBlocks();
41
42 bool isReachable(const CFGBlock *block) const {
43 return reachable[block->getBlockID()];
44 }
45};
46}
47
48void ReachableCode::computeReachableBlocks() {
49 if (!cfg.getNumBlockIDs())
50 return;
51
52 llvm::SmallVector<const CFGBlock*, 10> worklist;
53 worklist.push_back(&cfg.getEntry());
54
55 while (!worklist.empty()) {
56 const CFGBlock *block = worklist.back();
57 worklist.pop_back();
58 llvm::BitVector::reference isReachable = reachable[block->getBlockID()];
59 if (isReachable)
60 continue;
61 isReachable = true;
62 for (CFGBlock::const_succ_iterator i = block->succ_begin(),
63 e = block->succ_end(); i != e; ++i)
64 if (const CFGBlock *succ = *i)
65 worklist.push_back(succ);
66 }
67}
68
69namespace {
Kovarththanan Rajaratnamba5fb5a2009-11-28 06:07:30 +000070class DeadStoreObs : public LiveVariables::ObserverTy {
Ted Kremenek848ec832011-02-11 23:24:26 +000071 const CFG &cfg;
Chris Lattnerc0508f92007-09-15 23:21:08 +000072 ASTContext &Ctx;
Ted Kremenek8f269862008-07-14 20:56:04 +000073 BugReporter& BR;
Ted Kremenek1a654b62008-06-20 21:45:25 +000074 ParentMap& Parents;
Ted Kremenekf96f16d2009-04-07 05:25:24 +000075 llvm::SmallPtrSet<VarDecl*, 20> Escaped;
Ted Kremenek848ec832011-02-11 23:24:26 +000076 llvm::OwningPtr<ReachableCode> reachableCode;
77 const CFGBlock *currentBlock;
Mike Stump1eb44332009-09-09 15:08:12 +000078
Ted Kremenek2cfac222008-07-23 21:16:38 +000079 enum DeadStoreKind { Standard, Enclosing, DeadIncrement, DeadInit };
Mike Stump1eb44332009-09-09 15:08:12 +000080
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +000081public:
Ted Kremenek848ec832011-02-11 23:24:26 +000082 DeadStoreObs(const CFG &cfg, ASTContext &ctx,
83 BugReporter& br, ParentMap& parents,
Ted Kremenekf96f16d2009-04-07 05:25:24 +000084 llvm::SmallPtrSet<VarDecl*, 20> &escaped)
Ted Kremenek848ec832011-02-11 23:24:26 +000085 : cfg(cfg), Ctx(ctx), BR(br), Parents(parents),
86 Escaped(escaped), currentBlock(0) {}
Mike Stump1eb44332009-09-09 15:08:12 +000087
Ted Kremenekfdd225e2007-09-25 04:31:27 +000088 virtual ~DeadStoreObs() {}
Ted Kremenekb930d7a2009-04-01 06:52:48 +000089
Ted Kremenek2cfac222008-07-23 21:16:38 +000090 void Report(VarDecl* V, DeadStoreKind dsk, SourceLocation L, SourceRange R) {
Ted Kremenekf96f16d2009-04-07 05:25:24 +000091 if (Escaped.count(V))
92 return;
Ted Kremenek848ec832011-02-11 23:24:26 +000093
94 // Compute reachable blocks within the CFG for trivial cases
95 // where a bogus dead store can be reported because itself is unreachable.
96 if (!reachableCode.get()) {
97 reachableCode.reset(new ReachableCode(cfg));
98 reachableCode->computeReachableBlocks();
99 }
100
101 if (!reachableCode->isReachable(currentBlock))
102 return;
Ted Kremenek8f269862008-07-14 20:56:04 +0000103
Ted Kremenek848ec832011-02-11 23:24:26 +0000104 const std::string &name = V->getNameAsString();
Mike Stump1eb44332009-09-09 15:08:12 +0000105
Ted Kremenek2cfac222008-07-23 21:16:38 +0000106 const char* BugType = 0;
107 std::string msg;
Mike Stump1eb44332009-09-09 15:08:12 +0000108
Ted Kremenek2cfac222008-07-23 21:16:38 +0000109 switch (dsk) {
110 default:
111 assert(false && "Impossible dead store type.");
Mike Stump1eb44332009-09-09 15:08:12 +0000112
Ted Kremenek2cfac222008-07-23 21:16:38 +0000113 case DeadInit:
Ted Kremenekefc620c2009-04-02 22:50:16 +0000114 BugType = "Dead initialization";
Ted Kremenek2cfac222008-07-23 21:16:38 +0000115 msg = "Value stored to '" + name +
116 "' during its initialization is never read";
117 break;
Mike Stump1eb44332009-09-09 15:08:12 +0000118
Ted Kremenek2cfac222008-07-23 21:16:38 +0000119 case DeadIncrement:
Ted Kremenekefc620c2009-04-02 22:50:16 +0000120 BugType = "Dead increment";
Ted Kremenek2cfac222008-07-23 21:16:38 +0000121 case Standard:
Ted Kremenekefc620c2009-04-02 22:50:16 +0000122 if (!BugType) BugType = "Dead assignment";
Ted Kremenek2cfac222008-07-23 21:16:38 +0000123 msg = "Value stored to '" + name + "' is never read";
124 break;
Mike Stump1eb44332009-09-09 15:08:12 +0000125
Ted Kremenek2cfac222008-07-23 21:16:38 +0000126 case Enclosing:
Ted Kremenek56b1f712011-01-13 20:58:56 +0000127 // Don't report issues in this case, e.g.: "if (x = foo())",
128 // where 'x' is unused later. We have yet to see a case where
129 // this is a real bug.
130 return;
Ted Kremenekf9c2a5d2008-07-15 18:06:32 +0000131 }
Mike Stump1eb44332009-09-09 15:08:12 +0000132
Benjamin Kramerf0171732009-11-29 18:27:55 +0000133 BR.EmitBasicReport(BugType, "Dead store", msg, L, R);
Ted Kremenek1a654b62008-06-20 21:45:25 +0000134 }
Mike Stump1eb44332009-09-09 15:08:12 +0000135
Ted Kremenek1a654b62008-06-20 21:45:25 +0000136 void CheckVarDecl(VarDecl* VD, Expr* Ex, Expr* Val,
Ted Kremenek2cfac222008-07-23 21:16:38 +0000137 DeadStoreKind dsk,
Ted Kremenek1a654b62008-06-20 21:45:25 +0000138 const LiveVariables::AnalysisDataTy& AD,
139 const LiveVariables::ValTy& Live) {
140
Ted Kremenek852274d2009-12-16 03:18:58 +0000141 if (!VD->hasLocalStorage())
142 return;
143 // Reference types confuse the dead stores checker. Skip them
144 // for now.
145 if (VD->getType()->getAs<ReferenceType>())
146 return;
147
148 if (!Live(VD, AD) &&
Ted Kremenek74635d82009-12-03 00:46:16 +0000149 !(VD->getAttr<UnusedAttr>() || VD->getAttr<BlocksAttr>()))
Ted Kremenek2cfac222008-07-23 21:16:38 +0000150 Report(VD, dsk, Ex->getSourceRange().getBegin(),
Mike Stump1eb44332009-09-09 15:08:12 +0000151 Val->getSourceRange());
Ted Kremenek3eb817e2008-05-21 22:59:16 +0000152 }
Mike Stump1eb44332009-09-09 15:08:12 +0000153
Ted Kremenek2cfac222008-07-23 21:16:38 +0000154 void CheckDeclRef(DeclRefExpr* DR, Expr* Val, DeadStoreKind dsk,
Ted Kremeneka23157e2008-05-05 23:12:21 +0000155 const LiveVariables::AnalysisDataTy& AD,
156 const LiveVariables::ValTy& Live) {
Ted Kremeneka23157e2008-05-05 23:12:21 +0000157 if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl()))
Ted Kremenek2cfac222008-07-23 21:16:38 +0000158 CheckVarDecl(VD, DR, Val, dsk, AD, Live);
159 }
Mike Stump1eb44332009-09-09 15:08:12 +0000160
Ted Kremenek2cfac222008-07-23 21:16:38 +0000161 bool isIncrement(VarDecl* VD, BinaryOperator* B) {
162 if (B->isCompoundAssignmentOp())
163 return true;
Mike Stump1eb44332009-09-09 15:08:12 +0000164
Ted Kremenek2cfac222008-07-23 21:16:38 +0000165 Expr* RHS = B->getRHS()->IgnoreParenCasts();
166 BinaryOperator* BRHS = dyn_cast<BinaryOperator>(RHS);
Mike Stump1eb44332009-09-09 15:08:12 +0000167
Ted Kremenek2cfac222008-07-23 21:16:38 +0000168 if (!BRHS)
169 return false;
Mike Stump1eb44332009-09-09 15:08:12 +0000170
Ted Kremenek2cfac222008-07-23 21:16:38 +0000171 DeclRefExpr *DR;
Mike Stump1eb44332009-09-09 15:08:12 +0000172
Ted Kremenek2cfac222008-07-23 21:16:38 +0000173 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getLHS()->IgnoreParenCasts())))
174 if (DR->getDecl() == VD)
175 return true;
Mike Stump1eb44332009-09-09 15:08:12 +0000176
Ted Kremenek2cfac222008-07-23 21:16:38 +0000177 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getRHS()->IgnoreParenCasts())))
178 if (DR->getDecl() == VD)
179 return true;
Mike Stump1eb44332009-09-09 15:08:12 +0000180
Ted Kremenek2cfac222008-07-23 21:16:38 +0000181 return false;
Ted Kremeneka23157e2008-05-05 23:12:21 +0000182 }
Mike Stump1eb44332009-09-09 15:08:12 +0000183
Ted Kremenek848ec832011-02-11 23:24:26 +0000184 virtual void ObserveStmt(Stmt* S, const CFGBlock *block,
Ted Kremenekfdd225e2007-09-25 04:31:27 +0000185 const LiveVariables::AnalysisDataTy& AD,
186 const LiveVariables::ValTy& Live) {
Mike Stump1eb44332009-09-09 15:08:12 +0000187
Ted Kremenek848ec832011-02-11 23:24:26 +0000188 currentBlock = block;
189
Ted Kremenek1c86b152008-04-14 18:28:25 +0000190 // Skip statements in macros.
191 if (S->getLocStart().isMacroID())
192 return;
Mike Stump1eb44332009-09-09 15:08:12 +0000193
Ted Kremenekf4e532b2011-02-12 00:17:19 +0000194 // Only cover dead stores from regular assignments. ++/-- dead stores
195 // have never flagged a real bug.
Mike Stump1eb44332009-09-09 15:08:12 +0000196 if (BinaryOperator* B = dyn_cast<BinaryOperator>(S)) {
Ted Kremenekfdd225e2007-09-25 04:31:27 +0000197 if (!B->isAssignmentOp()) return; // Skip non-assignments.
Mike Stump1eb44332009-09-09 15:08:12 +0000198
Ted Kremenekc0576ca2007-09-10 17:36:42 +0000199 if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(B->getLHS()))
Ted Kremenek1a654b62008-06-20 21:45:25 +0000200 if (VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) {
Ted Kremeneke12691c2008-08-09 00:05:14 +0000201 // Special case: check for assigning null to a pointer.
Mike Stump1eb44332009-09-09 15:08:12 +0000202 // This is a common form of defensive programming.
Ted Kremenek89132202010-02-23 21:19:33 +0000203 QualType T = VD->getType();
204 if (T->isPointerType() || T->isObjCObjectPointerType()) {
Ted Kremenek93fab7c2009-11-22 20:26:21 +0000205 if (B->getRHS()->isNullPointerConstant(Ctx,
206 Expr::NPC_ValueDependentIsNull))
207 return;
Ted Kremeneke12691c2008-08-09 00:05:14 +0000208 }
Ted Kremenek93fab7c2009-11-22 20:26:21 +0000209
210 Expr* RHS = B->getRHS()->IgnoreParenCasts();
Ted Kremenek3b587862009-01-09 22:15:01 +0000211 // Special case: self-assignments. These are often used to shut up
212 // "unused variable" compiler warnings.
213 if (DeclRefExpr* RhsDR = dyn_cast<DeclRefExpr>(RHS))
214 if (VD == dyn_cast<VarDecl>(RhsDR->getDecl()))
215 return;
Mike Stump1eb44332009-09-09 15:08:12 +0000216
Ted Kremenek3b587862009-01-09 22:15:01 +0000217 // Otherwise, issue a warning.
Ted Kremenekb930d7a2009-04-01 06:52:48 +0000218 DeadStoreKind dsk = Parents.isConsumedExpr(B)
Mike Stump1eb44332009-09-09 15:08:12 +0000219 ? Enclosing
Ted Kremenek7f5fce72009-01-20 00:47:45 +0000220 : (isIncrement(VD,B) ? DeadIncrement : Standard);
Mike Stump1eb44332009-09-09 15:08:12 +0000221
Ted Kremeneke12691c2008-08-09 00:05:14 +0000222 CheckVarDecl(VD, DR, B->getRHS(), dsk, AD, Live);
Mike Stump1eb44332009-09-09 15:08:12 +0000223 }
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +0000224 }
Ted Kremeneka23157e2008-05-05 23:12:21 +0000225 else if (UnaryOperator* U = dyn_cast<UnaryOperator>(S)) {
Ted Kremenekf4e532b2011-02-12 00:17:19 +0000226 if (!U->isIncrementOp() || U->isPrefix())
Ted Kremeneka23157e2008-05-05 23:12:21 +0000227 return;
Mike Stump1eb44332009-09-09 15:08:12 +0000228
Ted Kremenekf4e532b2011-02-12 00:17:19 +0000229 Stmt *parent = Parents.getParentIgnoreParenCasts(U);
230 if (!parent || !isa<ReturnStmt>(parent))
Ted Kremenek380277e2008-10-15 05:23:41 +0000231 return;
Ted Kremenekb0f36322008-07-24 17:01:17 +0000232
Ted Kremeneka23157e2008-05-05 23:12:21 +0000233 Expr *Ex = U->getSubExpr()->IgnoreParenCasts();
Mike Stump1eb44332009-09-09 15:08:12 +0000234
Ted Kremeneka23157e2008-05-05 23:12:21 +0000235 if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(Ex))
Ted Kremenek2cfac222008-07-23 21:16:38 +0000236 CheckDeclRef(DR, U, DeadIncrement, AD, Live);
Mike Stump1eb44332009-09-09 15:08:12 +0000237 }
Ted Kremeneka23157e2008-05-05 23:12:21 +0000238 else if (DeclStmt* DS = dyn_cast<DeclStmt>(S))
Ted Kremenekfdd225e2007-09-25 04:31:27 +0000239 // Iterate through the decls. Warn if any initializers are complex
240 // expressions that are not live (never used).
Ted Kremenek14f8b4f2008-08-05 20:46:55 +0000241 for (DeclStmt::decl_iterator DI=DS->decl_begin(), DE=DS->decl_end();
242 DI != DE; ++DI) {
Mike Stump1eb44332009-09-09 15:08:12 +0000243
Ted Kremenek14f8b4f2008-08-05 20:46:55 +0000244 VarDecl* V = dyn_cast<VarDecl>(*DI);
Ted Kremenekfc7ff552008-07-25 04:47:34 +0000245
246 if (!V)
247 continue;
Ted Kremenek852274d2009-12-16 03:18:58 +0000248
249 if (V->hasLocalStorage()) {
250 // Reference types confuse the dead stores checker. Skip them
251 // for now.
252 if (V->getType()->getAs<ReferenceType>())
253 return;
254
Ted Kremenekfc7ff552008-07-25 04:47:34 +0000255 if (Expr* E = V->getInit()) {
Ted Kremenek43f19e32009-12-15 04:12:12 +0000256 // Don't warn on C++ objects (yet) until we can show that their
257 // constructors/destructors don't have side effects.
258 if (isa<CXXConstructExpr>(E))
259 return;
Ted Kremenek604d9392009-12-23 04:11:44 +0000260
John McCall4765fa02010-12-06 08:20:24 +0000261 if (isa<ExprWithCleanups>(E))
Ted Kremenek604d9392009-12-23 04:11:44 +0000262 return;
263
Ted Kremenekfc7ff552008-07-25 04:47:34 +0000264 // A dead initialization is a variable that is dead after it
265 // is initialized. We don't flag warnings for those variables
266 // marked 'unused'.
Argyrios Kyrtzidis40b598e2009-06-30 02:34:44 +0000267 if (!Live(V, AD) && V->getAttr<UnusedAttr>() == 0) {
Ted Kremenekc6a1faf2007-09-28 20:48:41 +0000268 // Special case: check for initializations with constants.
269 //
270 // e.g. : int x = 0;
271 //
272 // If x is EVER assigned a new value later, don't issue
273 // a warning. This is because such initialization can be
274 // due to defensive programming.
John McCall4204f072010-08-02 21:13:48 +0000275 if (E->isConstantInitializer(Ctx, false))
Ted Kremenekd3098ee2009-02-09 18:01:00 +0000276 return;
Mike Stump1eb44332009-09-09 15:08:12 +0000277
Ted Kremenekd3098ee2009-02-09 18:01:00 +0000278 if (DeclRefExpr *DRE=dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()))
Ted Kremenekebd42f42010-03-18 01:22:39 +0000279 if (VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
280 // Special case: check for initialization from constant
281 // variables.
282 //
283 // e.g. extern const int MyConstant;
284 // int x = MyConstant;
285 //
Ted Kremenekd3098ee2009-02-09 18:01:00 +0000286 if (VD->hasGlobalStorage() &&
Ted Kremenekebd42f42010-03-18 01:22:39 +0000287 VD->getType().isConstQualified())
288 return;
289 // Special case: check for initialization from scalar
290 // parameters. This is often a form of defensive
291 // programming. Non-scalars are still an error since
292 // because it more likely represents an actual algorithmic
293 // bug.
294 if (isa<ParmVarDecl>(VD) && VD->getType()->isScalarType())
295 return;
296 }
Mike Stump1eb44332009-09-09 15:08:12 +0000297
Ted Kremenekd3098ee2009-02-09 18:01:00 +0000298 Report(V, DeadInit, V->getLocation(), E->getSourceRange());
Ted Kremenekce1cab92007-09-11 17:24:14 +0000299 }
Ted Kremenekfc7ff552008-07-25 04:47:34 +0000300 }
Ted Kremenek852274d2009-12-16 03:18:58 +0000301 }
Ted Kremenekfdd225e2007-09-25 04:31:27 +0000302 }
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +0000303 }
304};
Mike Stump1eb44332009-09-09 15:08:12 +0000305
Ted Kremenek1ed6d2e2007-09-06 23:01:46 +0000306} // end anonymous namespace
307
Ted Kremenekd2f642b2008-04-14 17:39:48 +0000308//===----------------------------------------------------------------------===//
Ted Kremeneke2075582008-07-02 23:16:33 +0000309// Driver function to invoke the Dead-Stores checker on a CFG.
310//===----------------------------------------------------------------------===//
311
Ted Kremenekf96f16d2009-04-07 05:25:24 +0000312namespace {
Kovarththanan Rajaratnamba5fb5a2009-11-28 06:07:30 +0000313class FindEscaped : public CFGRecStmtDeclVisitor<FindEscaped>{
Ted Kremenekf96f16d2009-04-07 05:25:24 +0000314 CFG *cfg;
315public:
316 FindEscaped(CFG *c) : cfg(c) {}
Mike Stump1eb44332009-09-09 15:08:12 +0000317
Ted Kremenekf96f16d2009-04-07 05:25:24 +0000318 CFG& getCFG() { return *cfg; }
Mike Stump1eb44332009-09-09 15:08:12 +0000319
Ted Kremenekf96f16d2009-04-07 05:25:24 +0000320 llvm::SmallPtrSet<VarDecl*, 20> Escaped;
321
322 void VisitUnaryOperator(UnaryOperator* U) {
323 // Check for '&'. Any VarDecl whose value has its address-taken we
324 // treat as escaped.
325 Expr* E = U->getSubExpr()->IgnoreParenCasts();
John McCall2de56d12010-08-25 11:45:40 +0000326 if (U->getOpcode() == UO_AddrOf)
Ted Kremenekf96f16d2009-04-07 05:25:24 +0000327 if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(E))
328 if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl())) {
329 Escaped.insert(VD);
330 return;
331 }
332 Visit(E);
333 }
334};
335} // end anonymous namespace
Mike Stump1eb44332009-09-09 15:08:12 +0000336
Ted Kremenekf96f16d2009-04-07 05:25:24 +0000337
Ted Kremenek9ef65372010-12-23 07:20:52 +0000338void ento::CheckDeadStores(CFG &cfg, LiveVariables &L, ParentMap &pmap,
Zhongxing Xub317f8f2009-09-10 05:44:00 +0000339 BugReporter& BR) {
340 FindEscaped FS(&cfg);
Mike Stump1eb44332009-09-09 15:08:12 +0000341 FS.getCFG().VisitBlockStmts(FS);
Ted Kremenek848ec832011-02-11 23:24:26 +0000342 DeadStoreObs A(cfg, BR.getContext(), BR, pmap, FS.Escaped);
Zhongxing Xub317f8f2009-09-10 05:44:00 +0000343 L.runOnAllBlocks(cfg, &A);
Ted Kremenekd2f642b2008-04-14 17:39:48 +0000344}