[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / merge-template-members.cpp
blob88f5fc6c6af19c4de435c2bc15fc3c2de49f2dfd
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=1
3 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=2
4 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=3
5 // expected-no-diagnostics
7 #if TEST == 1
9 template<typename> struct A { int n; };
10 template<typename> struct B { typedef A<void> C; };
11 template class B<int>;
13 #include "update.h"
14 B<int>::C use2;
16 #elif TEST == 2
18 #include "c.h"
19 N::A<int> ai;
21 #elif TEST == 3
23 #include "merge.h"
25 #else
26 #error Unknown test
27 #endif