diff options
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCast.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp index d27500d3f13..e83dd071678 100644 --- a/clang/lib/Sema/SemaCast.cpp +++ b/clang/lib/Sema/SemaCast.cpp @@ -1314,16 +1314,13 @@ TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, } std::string PathDisplayStr; std::set<unsigned> DisplayedPaths; - for (CXXBasePaths::paths_iterator PI = Paths.begin(), PE = Paths.end(); - PI != PE; ++PI) { - if (DisplayedPaths.insert(PI->back().SubobjectNumber).second) { + for (clang::CXXBasePath &Path : Paths) { + if (DisplayedPaths.insert(Path.back().SubobjectNumber).second) { // We haven't displayed a path to this particular base // class subobject yet. PathDisplayStr += "\n "; - for (CXXBasePath::const_reverse_iterator EI = PI->rbegin(), - EE = PI->rend(); - EI != EE; ++EI) - PathDisplayStr += EI->Base->getType().getAsString() + " -> "; + for (CXXBasePathElement &PE : llvm::reverse(Path)) + PathDisplayStr += PE.Base->getType().getAsString() + " -> "; PathDisplayStr += QualType(DestType).getAsString(); } } |