Mercurial > hg > CbC > CbC_llvm
diff 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 |
line wrap: on
line diff
--- a/clang/test/PCH/cxx-templates.cpp Mon May 25 11:55:54 2020 +0900 +++ b/clang/test/PCH/cxx-templates.cpp Tue Jun 08 06:07:14 2021 +0900 @@ -17,6 +17,11 @@ // RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s // 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 +// Test with pch and template instantiation in the pch. +// 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 +// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t -verify %s +// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s + // CHECK: define weak_odr {{.*}}void @_ZN2S4IiE1mEv // CHECK: define linkonce_odr {{.*}}void @_ZN2S3IiE1mEv @@ -175,3 +180,8 @@ getWithIdentifier<HasMember>(); } } + +namespace ClassTemplateCycle { + extern T t; + int k = M; +}