Skip to content

Commit b79d3b9

Browse files
committed
[clang][NFC] Move CWG273 test into its own file
1 parent 81fae0d commit b79d3b9

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

clang/test/CXX/drs/cwg273.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// RUN: %clang_cc1 -std=c++98 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
2+
// RUN: %clang_cc1 -std=c++11 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
3+
// RUN: %clang_cc1 -std=c++14 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
4+
// RUN: %clang_cc1 -std=c++17 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
5+
// RUN: %clang_cc1 -std=c++20 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
6+
// RUN: %clang_cc1 -std=c++23 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
7+
// RUN: %clang_cc1 -std=c++2c %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
8+
9+
// expected-no-diagnostics
10+
11+
#include <stdarg.h>
12+
#include <stddef.h>
13+
namespace cwg273 { // cwg273: yes
14+
struct A {
15+
int n;
16+
};
17+
void operator&(A);
18+
void f(A a, ...) {
19+
offsetof(A, n);
20+
va_list val;
21+
va_start(val, a);
22+
va_end(val);
23+
}
24+
} // namespace cwg273

clang/test/CXX/drs/cwg2xx.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -950,21 +950,7 @@ namespace cwg272 { // cwg272: yes
950950
};
951951
} // namespace cwg272
952952

953-
#include <stdarg.h>
954-
#include <stddef.h>
955-
namespace cwg273 { // cwg273: yes
956-
struct A {
957-
int n;
958-
};
959-
void operator&(A);
960-
void f(A a, ...) {
961-
offsetof(A, n);
962-
va_list val;
963-
va_start(val, a);
964-
va_end(val);
965-
}
966-
} // namespace cwg273
967-
953+
// cwg273 is in cwg273.cpp
968954
// cwg274: na
969955

970956
namespace cwg275 { // cwg275: no

0 commit comments

Comments
 (0)