Mercurial > hg > CbC > CbC_llvm
comparison clang/test/PCH/cxx-templates.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
14 | 14 |
15 // Test with pch and delayed template parsing. | 15 // Test with pch and delayed template parsing. |
16 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h | 16 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h |
17 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s | 17 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s |
18 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s | 18 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s |
19 | |
20 // Test with pch and template instantiation in the pch. | |
21 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fpch-instantiate-templates -x c++-header -emit-pch -o %t %S/cxx-templates.h | |
22 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t -verify %s | |
23 // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s | |
19 | 24 |
20 // CHECK: define weak_odr {{.*}}void @_ZN2S4IiE1mEv | 25 // CHECK: define weak_odr {{.*}}void @_ZN2S4IiE1mEv |
21 // CHECK: define linkonce_odr {{.*}}void @_ZN2S3IiE1mEv | 26 // CHECK: define linkonce_odr {{.*}}void @_ZN2S3IiE1mEv |
22 | 27 |
23 struct A { | 28 struct A { |
173 | 178 |
174 void test() { | 179 void test() { |
175 getWithIdentifier<HasMember>(); | 180 getWithIdentifier<HasMember>(); |
176 } | 181 } |
177 } | 182 } |
183 | |
184 namespace ClassTemplateCycle { | |
185 extern T t; | |
186 int k = M; | |
187 } |