Skip to content

Commit 79d4d08

Browse files
committed
[Clang] Remove unnecessary if block in scoped enum test
Block containing `<=>` kept since it didn't exist prior to C++20
1 parent 469f559 commit 79d4d08

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clang/test/SemaCXX/enum-scoped.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++11 -verify -triple x86_64-apple-darwin %s
2-
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++17 -verify -triple x86_64-apple-darwin %s
1+
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++11 -verify=expected,cxx11-17 -triple x86_64-apple-darwin %s
2+
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++17 -verify=expected,cxx11-17 -triple x86_64-apple-darwin %s
33
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++20 -verify -triple x86_64-apple-darwin %s
44

55
enum class E1 {
@@ -329,10 +329,8 @@ namespace PR18044 {
329329
int E::*p; // expected-error {{does not point into a class}}
330330
using E::f; // expected-error {{no member named 'f'}}
331331

332-
#if __cplusplus < 202002L
333-
using E::a; // expected-warning {{using declaration naming a scoped enumerator is a C++20 extension}}
332+
using E::a; // cxx11-17-warning {{using declaration naming a scoped enumerator is a C++20 extension}}
334333
E b = a;
335-
#endif
336334
}
337335

338336
namespace test11 {

0 commit comments

Comments
 (0)