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
8 lines
86 B
C++
8 lines
86 B
C++
#ifndef P2_H
|
|
#define P2_H
|
|
namespace foo {
|
|
namespace bar {
|
|
}
|
|
} // namespace foo
|
|
#endif
|