ChuanqiXu added inline comments.
================ Comment at: clang/lib/Sema/SemaModule.cpp:848-849 + if (auto *FD = dyn_cast<FunctionDecl>(D)) { + if (FD->getTemplateSpecializationKind() == TSK_ExplicitSpecialization) + BadExport = true; + } else if (auto *VD = dyn_cast<VarDecl>(D)) { ---------------- iains wrote: > ChuanqiXu wrote: > > Given P2615R1 doesn't allow explicit-instantiation in export block too. > I think I must be missing something - I do not see that in the paper - please > could you expand your comment? See the proposed change in #[module.interface]p1 in the paper, it changed: ``` export declaration ``` to ``` export named-declaration ``` And the change between the old declaration and the new named declaration is in the proposed change in #[dcl.pre]p1. So it shows the special declarations shouldn't be allowed after `export`. Also I noted it is allowed to write `export { declaration-seq_opt }` where the `declaration-seq` may contain special declarations. It looks weird to me. I'll try to check it and ask WG21 when necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153542/new/ https://reviews.llvm.org/D153542 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits