xref: /llvm-project/clang/test/Driver/windows-seh-async-verify.cpp (revision e272c37934a06cd80b9b072afc09afae5fd8c218)
1 // RUN: %clang --target=x86_64-pc-windows -fasync-exceptions -fsyntax-only -### %s 2>&1 | FileCheck %s
2 // RUN: %clang_cl --target=x86_64-pc-windows /EHa -fsyntax-only -### -- %s 2>&1 | FileCheck %s
3 // RUN: %clang --target=x86_64-pc-windows-gnu -fasync-exceptions -fsyntax-only -### %s 2>&1 | FileCheck %s --check-prefixes=GNU-ALL,GNU
4 // RUN: %clang_cl --target=x86_64-pc-windows-gnu /EHa -fsyntax-only -### -- %s 2>&1 | FileCheck %s --check-prefixes=GNU-ALL,CL-GNU
5 
6 // CHECK-NOT: warning
7 // GNU: warning: argument unused during compilation: '-fasync-exceptions' [-Wunused-command-line-argument]
8 // CL-GNU: warning: argument unused during compilation: '/EHa' [-Wunused-command-line-argument]
9 
10 // CHECK: -fasync-exceptions
11 // GNU-ALL-NOT: -fasync-exceptions
12 struct S {
13     union _Un {
~_Un()14         ~_Un() {}
15         char _Buf[12];
16     };
17     _Un _un;
18 };
19 
20 struct Embed {
21     S v2;
22 };
23 
PR62449()24 void PR62449() { Embed v{}; }
25