diff --git a/clang/test/CXX/drs/dr17xx.cpp b/clang/test/CXX/drs/dr17xx.cpp index e91f4a6d69b3a..219119d1a4cd0 100644 --- a/clang/test/CXX/drs/dr17xx.cpp +++ b/clang/test/CXX/drs/dr17xx.cpp @@ -1,7 +1,22 @@ // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++20 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++23 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++2c %s -verify -fexceptions -fcxx-exceptions -pedantic-errors + +namespace dr1710 { // dr1710: no +// FIXME: all of the following is well-formed +template struct D1 : T::template B::template C {}; +template struct D2 : T::B::template C {}; +// expected-error@-1 {{use 'template' keyword to treat 'B' as a dependent template name}} +template struct D3 : T::template B::C {}; +// expected-error@-1 {{use 'template' keyword to treat 'C' as a dependent template name}} +template struct D4 : T::B::C {}; +// expected-error@-1 {{use 'template' keyword to treat 'B' as a dependent template name}} +// expected-error@-2 {{use 'template' keyword to treat 'C' as a dependent template name}} +} // namespace dr1710 namespace dr1715 { // dr1715: 3.9 #if __cplusplus >= 201103L @@ -146,3 +161,18 @@ namespace dr1778 { // dr1778: 9 static_assert(noexcept(D()), ""); #endif } + +namespace dr1794 { // dr1794: yes + // NB: dup 1710 +#if __cplusplus >= 201103L +template