[C++20] [Module] Support reachable definition initially/partiallyThis patch introduces a new kind of ModuleOwnershipKind asReachableWhenImported. This intended the status for reachable describeda
[C++20] [Module] Support reachable definition initially/partiallyThis patch introduces a new kind of ModuleOwnershipKind asReachableWhenImported. This intended the status for reachable describedat: https://eel.is/c++draft/module.reach#3.Note that this patch is not intended to support all semantics aboutreachable semantics. For example, this patch didn't implement discardeddeclarations in GMF. (https://eel.is/c++draft/module.global.frag#3).This fixes: https://bugs.llvm.org/show_bug.cgi?id=52281 andhttps://godbolt.org/z/81f3ocjfW.Reviewed By: rsmith, iainsDifferential Revision: https://reviews.llvm.org/D113545
show more ...
Revert "[C++20] [Modules] Implement Reachable initiallly"This reverts commit a223ba0a697c1598b434cf2495c9cd9ec5640fc7.The previous commit don't contain additional information, which is bad.
[C++20] [Modules] Implement Reachable initiallly
[C++20][Modules] Adjust handling of exports of namespaces and using-decls.This adjusts the handling for:export module M;export namespace {};export namespace N {};export using namespace N;
[C++20][Modules] Adjust handling of exports of namespaces and using-decls.This adjusts the handling for:export module M;export namespace {};export namespace N {};export using namespace N;In the first case, we were allowing empty anonymous namespacesas part of an extension allowing empty top-level entities, but that seemsinappropriate in this case, since the linkage would be internal for theanonymous namespace. We now report an error for this.The second case was producing a warning diagnostic that this wasaccepted as an extension - however the C++20 standard does allow thisas well-formed.In the third case we keep the current practice that this is accepted with awarning (as an extension). The C++20 standard says it's an error.We also ensure that using decls are only applied to items with external linkage.This adjusts error messages for exports involving redeclarations in modules tobe more specific about the reason that the decl has been rejected.Differential Revision: https://reviews.llvm.org/D122119
[C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExportedSince only the decls inhabit in a namespace scope could be exported, itis not meaningful to check it in CheckR
[C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExportedSince only the decls inhabit in a namespace scope could be exported, itis not meaningful to check it in CheckRedeclarationExported, whichimplements [module.interface]/p6.Reviewed By: urnathanDifferential Revision: https://reviews.llvm.org/D118120
[C++20] [Module] fix bug 47716 and implement [module.interface]/p6This fixes bug 47716.According to [module.interface]p2, it is meaningless to export an entitywhich is not in namespace scope.Th
[C++20] [Module] fix bug 47716 and implement [module.interface]/p6This fixes bug 47716.According to [module.interface]p2, it is meaningless to export an entitywhich is not in namespace scope.The reason why the compiler crashes is that the compiler missedExportDecl when the compiler traverse the subclass of DeclContext. Sohere is the crash.Also, the patch implements [module.interface]p6 inSema::CheckRedeclaration* functions.Reviewed By: aaron.ballman, urnathanDifferential Revision: https://reviews.llvm.org/D112903
C++ DR2387: a variable template declared wtih (or instantiated with) aconst-qualified type is not implicitly given internal linkage. But avariable template declared 'static' is.This reinstates pa
C++ DR2387: a variable template declared wtih (or instantiated with) aconst-qualified type is not implicitly given internal linkage. But avariable template declared 'static' is.This reinstates part of r359048, reverted in r359076.llvm-svn: 359260
Revert r359048: C++ DR2387: a variable template declared wthiThe change breaks libc++ with the follwing error:In file included from valarray:4:.../include/c++/v1/valarray:1062:60: error: explici
Revert r359048: C++ DR2387: a variable template declared wthiThe change breaks libc++ with the follwing error:In file included from valarray:4:.../include/c++/v1/valarray:1062:60: error: explicit instantiation declaration of 'valarray<_Tp>' with internal linkage_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS valarray<size_t>::valarray(size_t)) ^.../include/c++/v1/valarray:1063:60: error: explicit instantiation declaration of '~valarray<_Tp>' with internal linkage_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS valarray<size_t>::~valarray())llvm-svn: 359076
Add missing diagnostic for anonymous struct/union definitions that don'tintroduce any names.llvm-svn: 359051
C++ DR2387: a variable template declared wtih (or instantiated with) aconst-qualified type is not implicitly given internal linkage. But avariable template declared 'static' is.llvm-svn: 359048
[c++2a] Implement semantic restrictions for 'export' declarations.llvm-svn: 358932
[c++2a] Add semantic support for private module fragments.llvm-svn: 358713