summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-07 19:56:05 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-07 19:56:05 +0000
commit629afaefe0cd1a583ccee54918b7b13f48bfe273 (patch)
tree9a236cdf36b4b96c8aad05ccdb63d8f40f9acd9c /clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
parentd72a5f103da45e5abe10497308fce5aeb992cdc2 (diff)
downloadbcm5719-llvm-629afaefe0cd1a583ccee54918b7b13f48bfe273.tar.gz
bcm5719-llvm-629afaefe0cd1a583ccee54918b7b13f48bfe273.zip
[C++11] Replacing DeclBase iterators decls_begin() and decls_end() with iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203278
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
index 606c734a309..1566d3c29b4 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
@@ -101,9 +101,8 @@ static void Scan(IvarUsageMap& M, const ObjCContainerDecl *D) {
static void Scan(IvarUsageMap &M, const DeclContext *C, const FileID FID,
SourceManager &SM) {
- for (DeclContext::decl_iterator I=C->decls_begin(), E=C->decls_end();
- I!=E; ++I)
- if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
+ for (const auto *I : C->decls())
+ if (const auto *FD = dyn_cast<FunctionDecl>(I)) {
SourceLocation L = FD->getLocStart();
if (SM.getFileID(L) == FID)
Scan(M, FD->getBody());
OpenPOWER on IntegriCloud