iains added inline comments.

================
Comment at: clang/include/clang/AST/DeclBase.h:624
   bool isModulePrivate() const {
     return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate;
   }
----------------
ChuanqiXu wrote:
> According to the opinion from @rsmith, the discarded declaration is private 
> too.
I guess you mean `>=`  ... however Discardable is a stronger constraint than 
Private 

If a decl remains marked Discardable (after the processing to determine 
reachable ones) that means it is both unreachable and invisible.
So it must not participate in any processing (with the one exception of 
diagnostic output).  I would be concerned that the change you suggest above 
could cause a  Discardable decl to be considered in merging  or lookup and we 
would then need (maybe a lot) of logic like:

```
 if (D->isModulePrivate() && !D->isModuleDiscardable())
    ...
```

I will take a look on the next iteration.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126694

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to