[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-codeview-var-templates.cpp
blobdec4c01444afd71e9e80caa432fb4d64c18f58b6
1 // RUN: %clang_cc1 %s -std=c++14 -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
3 // Don't emit static data member debug info for variable templates.
4 // PR38004
6 struct TestImplicit {
7 template <typename T>
8 static const __SIZE_TYPE__ size_var = sizeof(T);
9 };
10 int instantiate_test1() { return TestImplicit::size_var<int> + TestImplicit::size_var<TestImplicit>; }
11 TestImplicit gv1;
13 // CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TestImplicit",
15 template <typename T> bool vtpl;
16 struct TestSpecialization {
17 template <typename T, typename U> static const auto sdm = vtpl<T>;
18 template <> static const auto sdm<int, int> = false;
19 } gv2;
21 // CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TestSpecialization",
23 template <class> bool a;
24 template <typename> struct b;
25 struct TestPartial {
26 template <typename... e> static auto d = a<e...>;
27 template <typename... e> static auto d<b<e...>> = d<e...>;
28 } c;
30 // CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TestPartial",