Skip to content

Commit f84b9c7

Browse files
committed
Refactor weird loop
1 parent 7cf99ba commit f84b9c7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,12 +5303,8 @@ bool CompilerInvocationBase::anyPath(
53035303
PROPAGATE_TRUE_IF(HeaderSearchOpts.ResourceDir);
53045304
PROPAGATE_TRUE_IF(HeaderSearchOpts.ModuleCachePath);
53055305
PROPAGATE_TRUE_IF(HeaderSearchOpts.ModuleUserBuildPath);
5306-
for (auto I = HeaderSearchOpts.PrebuiltModuleFiles.begin(),
5307-
E = HeaderSearchOpts.PrebuiltModuleFiles.end();
5308-
I != E;) {
5309-
auto Current = I++;
5310-
PROPAGATE_TRUE_IF(Current->second);
5311-
}
5306+
for (const auto &[Name, File] : HeaderSearchOpts.PrebuiltModuleFiles)
5307+
PROPAGATE_TRUE_IF(File);
53125308
PROPAGATE_TRUE_IF_MANY(HeaderSearchOpts.PrebuiltModulePaths);
53135309
PROPAGATE_TRUE_IF_MANY(HeaderSearchOpts.VFSOverlayFiles);
53145310

0 commit comments

Comments
 (0)