[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / uses-seh.cpp
blob430a95d211db03b4a09e72a7b57bda72f7ee74da
1 // Make SEH works in PCH
2 //
3 // Test this without pch.
4 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s
6 // Test with pch.
7 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
8 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s
10 #ifndef HEADER
11 #define HEADER
13 int shouldCatch();
14 inline int f() {
15 __try {
16 } __except (shouldCatch()) {
18 return 0;
20 int x = f();
22 // CHECK: define linkonce_odr dso_local noundef i32 @"?f@@YAHXZ"()
23 // CHECK: define internal noundef i32 @"?filt$0@0@f@@"({{.*}})
25 #else
27 // empty
29 #endif