Skip to content

Commit d15e424

Browse files
review: replace loop in isSubmoduleOf with call to clang version
1 parent 2aeef9e commit d15e424

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/AST/Module.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -914,12 +914,7 @@ bool ModuleDecl::isSubmoduleOf(const ModuleDecl *M) const {
914914
if (!ClangModule)
915915
return false;
916916

917-
while ((ClangModule = ClangModule->Parent)) {
918-
if (ClangModule == ClangParent)
919-
return true;
920-
}
921-
922-
return false;
917+
return ClangModule->isSubModuleOf(ClangParent);
923918
}
924919

925920
static bool isParsedModule(const ModuleDecl *mod) {

0 commit comments

Comments
 (0)