Skip to content

Commit 6cba9ff

Browse files
review: replace loop in isSubmoduleOf with call to clang version
1 parent 537ab83 commit 6cba9ff

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
@@ -955,12 +955,7 @@ bool ModuleDecl::isSubmoduleOf(const ModuleDecl *M) const {
955955
if (!ClangModule)
956956
return false;
957957

958-
while ((ClangModule = ClangModule->Parent)) {
959-
if (ClangModule == ClangParent)
960-
return true;
961-
}
962-
963-
return false;
958+
return ClangModule->isSubModuleOf(ClangParent);
964959
}
965960

966961
static bool isParsedModule(const ModuleDecl *mod) {

0 commit comments

Comments
 (0)