This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Clean up doc comment and implementation for Module::isSubModuleOf.
ClosedPublic

Authored by varungandhi-apple on Jul 17 2020, 10:25 PM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2020, 10:25 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Updated commit message with reviewer information and revision link.

aprantl accepted this revision.Jul 21 2020, 2:07 PM
aprantl added inline comments.
clang/lib/Basic/Module.cpp
175–176
for (const Module *Parent = this; Parent; Parent = Parent->Parent) {
  if (Parent == Other)
   return true;
}

?

This revision is now accepted and ready to land.Jul 21 2020, 2:07 PM
varungandhi-apple marked an inline comment as done.Jul 21 2020, 3:38 PM
varungandhi-apple added inline comments.
clang/lib/Basic/Module.cpp
175–176

That seems confusing... I would like to avoid giving a local variable the same name as an instance member. I can rename This to Current if that makes it clearer?

(Could you land the patch if it looks good? I don't have commit access.)

This revision was automatically updated to reflect the committed changes.