[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
Showing
- include/clang/Basic/DiagnosticParseKinds.td 8 additions, 2 deletionsinclude/clang/Basic/DiagnosticParseKinds.td
- lib/Parse/ParseDeclCXX.cpp 18 additions, 19 deletionslib/Parse/ParseDeclCXX.cpp
- test/CXX/drs/dr3xx.cpp 8 additions, 2 deletionstest/CXX/drs/dr3xx.cpp
- test/Parser/cxx1z-nested-namespace-definition.cpp 38 additions, 0 deletionstest/Parser/cxx1z-nested-namespace-definition.cpp
- www/cxx_status.html 5 additions, 0 deletionswww/cxx_status.html
Loading
Please register or sign in to comment