[clang] b79d3b9 - [clang][NFC] Move CWG273 test into its own file
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 6 06:30:47 PST 2025
Author: Vlad Serebrennikov
Date: 2025-01-06T17:30:39+03:00
New Revision: b79d3b9519620e34f0e223fdb4a6731db6cda88f
URL: https://github.com/llvm/llvm-project/commit/b79d3b9519620e34f0e223fdb4a6731db6cda88f
DIFF: https://github.com/llvm/llvm-project/commit/b79d3b9519620e34f0e223fdb4a6731db6cda88f.diff
LOG: [clang][NFC] Move CWG273 test into its own file
Added:
clang/test/CXX/drs/cwg273.cpp
Modified:
clang/test/CXX/drs/cwg2xx.cpp
Removed:
################################################################################
diff --git a/clang/test/CXX/drs/cwg273.cpp b/clang/test/CXX/drs/cwg273.cpp
new file mode 100644
index 00000000000000..934ebdb919a4bc
--- /dev/null
+++ b/clang/test/CXX/drs/cwg273.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++14 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++17 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++20 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++23 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++2c %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
+
+// expected-no-diagnostics
+
+#include <stdarg.h>
+#include <stddef.h>
+namespace cwg273 { // cwg273: yes
+ struct A {
+ int n;
+ };
+ void operator&(A);
+ void f(A a, ...) {
+ offsetof(A, n);
+ va_list val;
+ va_start(val, a);
+ va_end(val);
+ }
+} // namespace cwg273
diff --git a/clang/test/CXX/drs/cwg2xx.cpp b/clang/test/CXX/drs/cwg2xx.cpp
index f9010235b82473..9ac93d78d747e2 100644
--- a/clang/test/CXX/drs/cwg2xx.cpp
+++ b/clang/test/CXX/drs/cwg2xx.cpp
@@ -950,21 +950,7 @@ namespace cwg272 { // cwg272: yes
};
} // namespace cwg272
-#include <stdarg.h>
-#include <stddef.h>
-namespace cwg273 { // cwg273: yes
- struct A {
- int n;
- };
- void operator&(A);
- void f(A a, ...) {
- offsetof(A, n);
- va_list val;
- va_start(val, a);
- va_end(val);
- }
-} // namespace cwg273
-
+// cwg273 is in cwg273.cpp
// cwg274: na
namespace cwg275 { // cwg275: no
More information about the cfe-commits
mailing list