File tree 1 file changed +3
-3
lines changed
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) {
87
87
assert (Iter != End && " Expected there to be a non-root path component." );
88
88
// Add the rest of the path components, encoding any reserved characters;
89
89
// 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) ) {
91
91
// For reasons unknown to me, we may get a backslash with Windows native
92
92
// paths for the initial backslash following the drive component, which
93
93
// we need to ignore as a URI path part.
94
94
if (Component == " \\ " )
95
- return ;
95
+ continue ;
96
96
97
97
// Add the separator between the previous path part and the one being
98
98
// currently processed.
@@ -102,7 +102,7 @@ static std::string fileNameToURI(StringRef Filename) {
102
102
for (char C : Component) {
103
103
Ret += percentEncodeURICharacter (C);
104
104
}
105
- });
105
+ }
106
106
107
107
return std::string (Ret);
108
108
}
You can’t perform that action at this time.
0 commit comments