summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/LiveVariables.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-14 17:01:24 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-14 17:01:24 +0000
commit535bbcccb12b3a98bd53b68fef678e38814dbb0c (patch)
treed1734ec7627827f84eda60ea88c320fcc06a5d1b /clang/lib/Analysis/LiveVariables.cpp
parentedc1753ba342c6b9ab1f0ab9e047a9ee82b0c079 (diff)
downloadbcm5719-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/Analysis/LiveVariables.cpp')
-rw-r--r--clang/lib/Analysis/LiveVariables.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp
index 799799c5426..5d7de846312 100644
--- a/clang/lib/Analysis/LiveVariables.cpp
+++ b/clang/lib/Analysis/LiveVariables.cpp
@@ -389,9 +389,8 @@ void TransferFunctions::VisitDeclRefExpr(DeclRefExpr *DR) {
}
void TransferFunctions::VisitDeclStmt(DeclStmt *DS) {
- for (DeclStmt::decl_iterator DI=DS->decl_begin(), DE = DS->decl_end();
- DI != DE; ++DI)
- if (VarDecl *VD = dyn_cast<VarDecl>(*DI)) {
+ for (const auto *DI : DS->decls())
+ if (const auto *VD = dyn_cast<VarDecl>(DI)) {
if (!isAlwaysAlive(VD))
val.liveDecls = LV.DSetFact.remove(val.liveDecls, VD);
}
OpenPOWER on IntegriCloud