[clang] Add test for CWG1821
authorVlad Serebrennikov <serebrennikov.vladislav@gmail.com>
Tue, 25 Apr 2023 06:03:14 +0000 (09:03 +0300)
committerVlad Serebrennikov <serebrennikov.vladislav@gmail.com>
Tue, 25 Apr 2023 06:03:46 +0000 (09:03 +0300)
commit5cda0d165a752c8041e8da4d39632c001463fa30
tree36ab1df0a4d5828afcc2566183fdf5a8bb66d1f6
parent68dd51421f16f1e17cd453cb1730fcca99a6cfb7
[clang] Add test for CWG1821

[[https://wg21.link/p1787 | P1787]]: My clarification in [[ http://lists.isocpp.org/core/2019/06/6614.php | “Where can namespace-scope functions and variables be redeclared?” ]] is applied, resolving CWG1821.
Wording: (If the declaration is not a friend declaration:) If the id-expression in a declarator-id is a qualified-id Q, let S be its lookup context; the declaration shall inhabit a namespace scope. ([dcl.meaning]/1)

Reviewed By: shafik, #clang-language-wg

Differential Revision: https://reviews.llvm.org/D149003
clang/test/CXX/drs/dr18xx.cpp
clang/www/cxx_dr_status.html