summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CheckDeadStores.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/CheckDeadStores.cpp')
-rw-r--r--clang/lib/Analysis/CheckDeadStores.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CheckDeadStores.cpp b/clang/lib/Analysis/CheckDeadStores.cpp
index f0d3dd1b623..38078e38236 100644
--- a/clang/lib/Analysis/CheckDeadStores.cpp
+++ b/clang/lib/Analysis/CheckDeadStores.cpp
@@ -161,9 +161,10 @@ public:
else if (DeclStmt* DS = dyn_cast<DeclStmt>(S))
// Iterate through the decls. Warn if any initializers are complex
// expressions that are not live (never used).
- for (ScopedDecl* SD = DS->getDecl(); SD; SD = SD->getNextDeclarator()) {
+ for (DeclStmt::decl_iterator DI=DS->decl_begin(), DE=DS->decl_end();
+ DI != DE; ++DI) {
- VarDecl* V = dyn_cast<VarDecl>(SD);
+ VarDecl* V = dyn_cast<VarDecl>(*DI);
if (!V)
continue;
OpenPOWER on IntegriCloud