summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/windows-seh-async-verify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Driver/windows-seh-async-verify.cpp')
-rw-r--r--clang/test/Driver/windows-seh-async-verify.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/Driver/windows-seh-async-verify.cpp b/clang/test/Driver/windows-seh-async-verify.cpp
new file mode 100644
index 000000000000..ace93cf44a31
--- /dev/null
+++ b/clang/test/Driver/windows-seh-async-verify.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang --target=x86_64-pc-windows -fasync-exceptions -fsyntax-only -### %s 2>&1 | FileCheck %s
+// RUN: %clang_cl --target=x86_64-pc-windows /EHa -fsyntax-only -### -- %s 2>&1 | FileCheck %s
+// RUN: %clang --target=x86_64-pc-windows-gnu -fasync-exceptions -fsyntax-only -### %s 2>&1 | FileCheck %s --check-prefixes=GNU-ALL,GNU
+// RUN: %clang_cl --target=x86_64-pc-windows-gnu /EHa -fsyntax-only -### -- %s 2>&1 | FileCheck %s --check-prefixes=GNU-ALL,CL-GNU
+
+// CHECK-NOT: warning
+// GNU: warning: argument unused during compilation: '-fasync-exceptions' [-Wunused-command-line-argument]
+// CL-GNU: warning: argument unused during compilation: '/EHa' [-Wunused-command-line-argument]
+
+// CHECK: -fasync-exceptions
+// GNU-ALL-NOT: -fasync-exceptions
+struct S {
+ union _Un {
+ ~_Un() {}
+ char _Buf[12];
+ };
+ _Un _un;
+};
+
+struct Embed {
+ S v2;
+};
+
+void PR62449() { Embed v{}; }