diff --git a/clang/test/CXX/drs/dr0xx.cpp b/clang/test/CXX/drs/dr0xx.cpp --- a/clang/test/CXX/drs/dr0xx.cpp +++ b/clang/test/CXX/drs/dr0xx.cpp @@ -2,6 +2,8 @@ // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple // RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple +// RUN: %clang_cc1 -std=c++20 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple +// RUN: %clang_cc1 -std=c++2b %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple namespace dr1 { // dr1: no namespace X { extern "C" void dr1_f(int a = 1); } @@ -448,6 +450,94 @@ // dr34: na // dr35: dup 178 + +namespace dr36 { // dr36: yes +namespace example1 { + namespace A { + int i; + } + + namespace A1 { + using A::i; + using A::i; + } + + void f() + { + using A::i; + using A::i; + } +} + +namespace example2 { + struct A + { + int i; + static int j; + }; + + struct B : A { }; + struct C : A { }; + + struct D : virtual B, virtual C + { + using B::i; // expected-note {{previous using declaration}} + using B::i; // expected-error {{redeclaration of using declaration}} + + using C::i; // expected-note {{previous using declaration}} + using C::i; // expected-error {{redeclaration of using declaration}} + + using B::j; // expected-note {{previous using declaration}} + using B::j; // expected-error {{redeclaration of using declaration}} + + using C::j; // expected-note {{previous using declaration}} + using C::j; // expected-error {{redeclaration of using declaration}} + }; +} + +namespace example3 { + template + struct A + { + T i; + static T j; + }; + + template + struct B : A { }; + template + struct C : A { }; + + template + struct D : virtual B, virtual C + { + using B::i; // expected-note {{previous using declaration}} + using B::i; // expected-error {{redeclaration of using declaration}} + + using C::i; // expected-note {{previous using declaration}} + using C::i; // expected-error {{redeclaration of using declaration}} + + using B::j; // expected-note {{previous using declaration}} + using B::j; // expected-error {{redeclaration of using declaration}} + + using C::j; // expected-note {{previous using declaration}} + using C::j; // expected-error {{redeclaration of using declaration}} + }; +} +namespace example4 { + template + struct E { + T k; + }; + + template + struct G : E { + using E::k; // expected-note {{previous using declaration}} + using E::k; // expected-error {{redeclaration of using declaration}} + }; +} +} + // dr37: sup 475 namespace dr38 { // dr38: yes @@ -699,6 +789,8 @@ } namespace dr59 { // dr59: yes +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-volatile" template struct convert_to { operator T() const; }; struct A {}; // expected-note 5+{{candidate}} struct B : A {}; // expected-note 0+{{candidate}} @@ -732,6 +824,7 @@ int n3 = convert_to(); int n4 = convert_to(); int n5 = convert_to(); +#pragma clang diagnostic pop } namespace dr60 { // dr60: yes diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -254,7 +254,7 @@ 36 CD6 using-declarations in multiple-declaration contexts - Unknown + Yes 37