diff options
-rw-r--r-- | Analysis/DeadStores.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Analysis/DeadStores.cpp b/Analysis/DeadStores.cpp index a9a42a8e18..e547989f6b 100644 --- a/Analysis/DeadStores.cpp +++ b/Analysis/DeadStores.cpp @@ -50,7 +50,7 @@ public: // Iterate through the decls. Warn if any of them (which have // initializers) are not live. for (VarDecl* V = cast<VarDecl>(DS->getDecl()); V != NULL ; - V = cast<VarDecl>(V->getNextDeclarator())) + V = cast_or_null<VarDecl>(V->getNextDeclarator())) if (Expr* E = V->getInit()) if (!L.isLive(Live,V)) { SourceRange R = E->getSourceRange(); |