diff options
-rw-r--r-- | clang/Analysis/DeadStores.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Analysis/DeadStores.cpp b/clang/Analysis/DeadStores.cpp index a9a42a8e18f..e547989f6b8 100644 --- a/clang/Analysis/DeadStores.cpp +++ b/clang/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(); |