[all-commits] [llvm/llvm-project] 60f826: [C++20] [Modules] Namespace Declaration shouldn't ...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Tue Dec 7 21:54:49 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 60f826663d86e9bdf7adef9a8f1b2fc398e07f2a
https://github.com/llvm/llvm-project/commit/60f826663d86e9bdf7adef9a8f1b2fc398e07f2a
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2021-12-08 (Wed, 08 Dec 2021)
Changed paths:
M clang/lib/AST/Decl.cpp
A clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.cppm
A clang/test/CXX/basic/basic.namespace/basic.namespace.general/Inputs/p2.h
A clang/test/CXX/basic/basic.namespace/basic.namespace.general/p2.cppm
Log Message:
-----------
[C++20] [Modules] Namespace Declaration shouldn't have module linkage
According to [basic.namespace.general]/p2, a namespace declaration
shouldn't have a module linkage.
> A namespace is never attached to a named module and never has a name
> with module linkage.
Without this patch, the compiler would crash for the test in assertion
enabled build due to inconsistent linkage for redeclaration for
namespaces.
Reviewed by: rsmith
Differential Revision: https://reviews.llvm.org/D115132
More information about the All-commits
mailing list