ChuanqiXu added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:9351
+ (NewFD->isExternCContext() || NewFD->isExternCXXContext())) {
+ if (!getGlobalModule())
+ Diag(NewFD->getLocation(),
----------------
aaron.ballman wrote:
> I'm a bit confused here. [module.unit]p7 is describing what module a
> declaration attached to under which circumstances. I don't see a constraint
> there which should result in a diagnostic. My reading of
> https://eel.is/c++draft/module.unit#6 is that the global module always
> exists, so we should be able to attach declarations to it at any point. Am I
> misunderstanding?
Yeah, after looking into this, I think you are right. We should create the
global module when we need it but failed to find it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110215/new/
https://reviews.llvm.org/D110215
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits