xref: /llvm-project/clang/test/CodeGenCXX/ms-local-vft-alias-comdat.cpp (revision 10cc3a8556a8ff9557890c96de162cb2c09669e2)
1*10cc3a85Sjyu2-git // RUN: %clang_cc1 -fcxx-exceptions -triple=x86_64-windows-msvc  \
2*10cc3a85Sjyu2-git // RUN:  -Wmicrosoft-template -fms-compatibility -emit-llvm %s -o - \
3*10cc3a85Sjyu2-git // RUN:  | FileCheck %s
4*10cc3a85Sjyu2-git 
5*10cc3a85Sjyu2-git template <typename a> struct T {
6*10cc3a85Sjyu2-git   virtual void c();
TT7*10cc3a85Sjyu2-git   T(a h) {}
8*10cc3a85Sjyu2-git };
9*10cc3a85Sjyu2-git struct m {
abm10*10cc3a85Sjyu2-git   template <typename j> void ab(j ac) {
11*10cc3a85Sjyu2-git     using ad = T<j>;
12*10cc3a85Sjyu2-git     ad j(ac);
13*10cc3a85Sjyu2-git   }
14*10cc3a85Sjyu2-git };
15*10cc3a85Sjyu2-git template <typename ae> struct n {
nn16*10cc3a85Sjyu2-git   template <typename j> n(j ac) { q.ab(ac); }
17*10cc3a85Sjyu2-git   ae q;
18*10cc3a85Sjyu2-git };
19*10cc3a85Sjyu2-git class s : n<m> {
20*10cc3a85Sjyu2-git   using ag = n<m>;
21*10cc3a85Sjyu2-git public:
s(j ac)22*10cc3a85Sjyu2-git   template <typename j> s(j ac) : ag(ac) {}
23*10cc3a85Sjyu2-git };
24*10cc3a85Sjyu2-git struct ah {
25*10cc3a85Sjyu2-git   ah(s);
__anoncdc6d7de0102null26*10cc3a85Sjyu2-git } a([]{});
27*10cc3a85Sjyu2-git 
28*10cc3a85Sjyu2-git //CHECK: @0 = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4?$T@V<lambda_0>@@@@6B@", ptr @"?c@?$T@V<lambda_0>@@@@UEAAXXZ"] }
29*10cc3a85Sjyu2-git //CHECK: @"??_7?$T@V<lambda_0>@@@@6B@" = internal unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr @0, i32 0, i32 0, i32 1)
30*10cc3a85Sjyu2-git //CHECK-NOT : "??_7?$e@V<lambda_0>@@@@6B@" = comdat any
31