File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,12 @@ static std::string fileNameToURI(StringRef Filename) {
8787 assert (Iter != End && " Expected there to be a non-root path component." );
8888 // Add the rest of the path components, encoding any reserved characters;
8989 // we skip past the first path component, as it was handled it above.
90- std::for_each (++Iter, End, [&Ret](StringRef Component ) {
90+ for (StringRef Component : llvm::make_range (++Iter, End) ) {
9191 // For reasons unknown to me, we may get a backslash with Windows native
9292 // paths for the initial backslash following the drive component, which
9393 // we need to ignore as a URI path part.
9494 if (Component == " \\ " )
95- return ;
95+ continue ;
9696
9797 // Add the separator between the previous path part and the one being
9898 // currently processed.
@@ -102,7 +102,7 @@ static std::string fileNameToURI(StringRef Filename) {
102102 for (char C : Component) {
103103 Ret += percentEncodeURICharacter (C);
104104 }
105- });
105+ }
106106
107107 return std::string (Ret);
108108}
You can’t perform that action at this time.
0 commit comments