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

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 14:07:39 PDT 2020


aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Basic/Module.cpp:176
 bool Module::isSubModuleOf(const Module *Other) const {
-  const Module *This = this;
-  do {
+  for (const Module *This = this; This != nullptr; This = This->Parent) {
     if (This == Other)
----------------
```
for (const Module *Parent = this; Parent; Parent = Parent->Parent) {
  if (Parent == Other)
   return true;
}
```
?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84087/new/

https://reviews.llvm.org/D84087





More information about the cfe-commits mailing list