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 @@ -180,7 +180,7 @@ void codeql::extractSwiftFiles(const SwiftExtractorConfiguration& config,
180
180
swift::CompilerInstance& compiler) {
181
181
auto inputFiles = collectInputFilenames (compiler);
182
182
std::vector<swift::ModuleDecl*> todo = {compiler.getMainModule ()};
183
- std::unordered_set<swift::ModuleDecl*> processed = {};
183
+ std::unordered_set<swift::ModuleDecl*> seen = {compiler. getMainModule () };
184
184
185
185
while (!todo.empty ()) {
186
186
auto module = todo.back ();
@@ -203,10 +203,10 @@ void codeql::extractSwiftFiles(const SwiftExtractorConfiguration& config,
203
203
if (!isFromSourceFile) {
204
204
encounteredModules = extractDeclarations (config, compiler, *module );
205
205
}
206
- processed.insert (module );
207
206
for (auto encountered : encounteredModules) {
208
- if (processed .count (encountered) == 0 ) {
207
+ if (seen .count (encountered) == 0 ) {
209
208
todo.push_back (encountered);
209
+ seen.insert (encountered);
210
210
}
211
211
}
212
212
}
You can’t perform that action at this time.
0 commit comments