diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 17:01:24 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 17:01:24 +0000 |
commit | 535bbcccb12b3a98bd53b68fef678e38814dbb0c (patch) | |
tree | d1734ec7627827f84eda60ea88c320fcc06a5d1b /clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | |
parent | edc1753ba342c6b9ab1f0ab9e047a9ee82b0c079 (diff) | |
download | bcm5719-llvm-535bbcccb12b3a98bd53b68fef678e38814dbb0c.tar.gz bcm5719-llvm-535bbcccb12b3a98bd53b68fef678e38814dbb0c.zip |
[C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203947
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp index 87f1a3d19a9..e804ae3009b 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp @@ -313,10 +313,8 @@ public: else if (const DeclStmt *DS = dyn_cast<DeclStmt>(S)) // Iterate through the decls. Warn if any initializers are complex // expressions that are not live (never used). - for (DeclStmt::const_decl_iterator DI=DS->decl_begin(), DE=DS->decl_end(); - DI != DE; ++DI) { - - VarDecl *V = dyn_cast<VarDecl>(*DI); + for (const auto *DI : DS->decls()) { + const auto *V = dyn_cast<VarDecl>(DI); if (!V) continue; |