[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / mangle-ms-cxx17.cpp
blob3657604e572f37417935123b67e6acf850d61e7e
1 // RUN: %clang_cc1 -std=c++1z -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=19.10 | FileCheck -allow-deprecated-dag-overlap %s
2 // RUN: %clang_cc1 -std=c++1z -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=19.00 | FileCheck -allow-deprecated-dag-overlap %s
4 struct S {
5 int x;
6 double y;
7 };
8 S f();
10 // CHECK-DAG: "?$S1@@3US@@B"
11 const auto [x0, y0] = f();
12 // CHECK-DAG: "?$S2@@3US@@B"
13 const auto [x1, y1] = f();
15 static union {
16 int a;
17 double b;
20 // CHECK-DAG: "?$S4@@3US@@B"
21 const auto [x2, y2] = f();
23 // CHECK-DAG: "?i1@@3V<lambda_1>@0@B"
24 inline const auto i1 = [](auto x) { return 0; };
25 // CHECK-DAG: "?i2@@3V<lambda_1>@0@B"
26 inline const auto i2 = [](auto x) { return 1; };
27 // CHECK-DAG: "??$?RH@<lambda_1>@i1@@QBE?A?<auto>@@H@Z"
28 // CHECK-DAG: "??$?RH@<lambda_1>@i2@@QBE?A?<auto>@@H@Z"
29 int g() {return i1(1) + i2(1); }