diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 17:00:06 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-13 17:00:06 +0000 |
commit | 75cecc70e2ed230c8cdde5da2637baa590e9946b (patch) | |
tree | 67d61e07196c29d0c019262f9c1c3c9e87127957 /lib/Sema/SemaAccess.cpp | |
parent | 427334b55da913e7440d6bcb3cccedd5926b2480 (diff) |
[C++11] Replacing CXXRecordDecl iterators friend_begin() and friend_end() with iterator_range friends(). Updating all of the usages of the iterators with range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 541b7f9275..f7806d2516 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -571,10 +571,7 @@ static AccessResult GetFriendKind(Sema &S, AccessResult OnFailure = AR_inaccessible; // Okay, check friends. - for (CXXRecordDecl::friend_iterator I = Class->friend_begin(), - E = Class->friend_end(); I != E; ++I) { - FriendDecl *Friend = *I; - + for (auto *Friend : Class->friends()) { switch (MatchesFriend(S, EC, Friend)) { case AR_accessible: return AR_accessible; |