aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2021-05-04 09:56:02 +0100
committerIain Sandoe <iain@sandoe.co.uk>2022-04-08 08:57:37 +0100
commitf60dc3caa67374c0e2941ee3866b5eaef0c6ffe6 (patch)
treee8b6fb69420edb30f71981da4f2eae27ba3f168d /clang/lib/Frontend/TestModuleFileExtension.cpp
parente79b7f501c19784d6160b105a8b84e7fdf28e113 (diff)
downloadllvm-f60dc3caa67374c0e2941ee3866b5eaef0c6ffe6.zip
llvm-f60dc3caa67374c0e2941ee3866b5eaef0c6ffe6.tar.gz
llvm-f60dc3caa67374c0e2941ee3866b5eaef0c6ffe6.tar.bz2
[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 namespaces as part of an extension allowing empty top-level entities, but that seems inappropriate in this case, since the linkage would be internal for the anonymous namespace. We now report an error for this. The second case was producing a warning diagnostic that this was accepted as an extension - however the C++20 standard does allow this as well-formed. In the third case we keep the current practice that this is accepted with a warning (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 to be more specific about the reason that the decl has been rejected. Differential Revision: https://reviews.llvm.org/D122119
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions