]> granicus.if.org Git - clang/commit
[c++1z] Implement nested-namespace-definitions.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 8 Nov 2014 05:37:34 +0000 (05:37 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 8 Nov 2014 05:37:34 +0000 (05:37 +0000)
commitd331bec8ac961ae235a416e66057282baa715429
treea60d2ca63e65bf6740d01e20a1948ceae24b907d
parent4617a9dfc9ecc2c10153b1554b141b14e576a6a2
[c++1z] Implement nested-namespace-definitions.

This allows 'namespace A::B { ... }' as a shorthand for 'namespace A {
namespace B { ... } }'. We already supported this correctly for error recovery;
promote that support to a full implementation.

This is not the right implementation: we do not maintain source fidelity
because we desugar the nested namespace definition in the parser. This is
tricky to avoid, since the definition genuinely does inject one named
entity per level in the namespace name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221574 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/ParseDeclCXX.cpp
test/CXX/drs/dr3xx.cpp
test/Parser/cxx1z-nested-namespace-definition.cpp [new file with mode: 0644]
test/Parser/nested-namespaces-recovery.cpp [deleted file]
www/cxx_status.html