[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-compatibility.cpp
blob81e4ad8db8270fd5df93ec90844ff5eb13cda0bb
1 // RUN: %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -fms-compatibility -emit-llvm -o - | FileCheck %s
3 template <typename>
4 struct S {
5 static const int x[];
6 };
8 template <>
9 const int S<char>::x[] = {1};
11 // CHECK-LABEL: @"?x@?$S@D@@2QBHB" = weak_odr dso_local constant [1 x i32] [i32 1], comdat
13 template<class T>
14 void destroy(T *p) {
15 p->~T();
18 extern "C" void f() {
19 int a;
20 destroy((void*)&a);
23 // CHECK-LABEL: define dso_local void @f()
24 // CHECK: call void @"??$destroy@X@@YAXPAX@Z"
25 // CHECK: ret void
27 // CHECK-LABEL: define linkonce_odr dso_local void @"??$destroy@X@@YAXPAX@Z"(ptr noundef %p)
28 // The pseudo-dtor expr should not generate calls to anything.
29 // CHECK-NOT: call
30 // CHECK-NOT: invoke
31 // CHECK: ret void